And Or Between In Dataset Filter

Mar 17, 2008

Hello.
I'm trying to add filters to my dataset.
I pressed on the "..." of the dataset and want to the filter tab.

In the dataset I have a column name "age". I want to add a filter that will leave only records between a range of numbers according to a parameter.

I have a parameter with those available values and text:
VALUE TEXT
0 all
1 age 0 - 50
2 age 51-70
3 age 71-120

How can I do this?

I thought I'll have to use the "between" operator and the in the value write my own expression acording to my parameter value but there isn't any operator like that.
Also, the "And/Or" column is grayed and I can't add "And".

Can any body help?

Yhanks.

View 5 Replies


ADVERTISEMENT

Filter One One Dataset With Values In Another Dataset?

Dec 19, 2006

Hi,

I have two datasets in my report, D1 and D2.

D1 is a list of classes with classid and title

D2 is a list of data. each row in D2 has a classid. D2 may or may not have all the classids in D1. all classids in D2 must be in D1.

I want to show fields in D2 and group the data with classids in D1 and show every group as a seperate table. If no data in D2 is available for a classid, It shows a empty table.

Is there any way to do this in RS2005?

View 2 Replies View Related

Dataset Filter By The Current User

Dec 7, 2007

Is there a way to only return the data that the user is allow to see?

Example:
A student login into the Report Server and open the Class Report It will only display all the classes this student is in.

View 1 Replies View Related

Filter A Dataset With The Range (inc.) Operator

Mar 12, 2007

It seems that when I use the Range(inc.) as the filter operator for a Dataset and then try to use the Last and First keywords to extract the results from the dataset in the layout the results are sometimes wrong and don't match the expected.

Does anyone knows of any issues that would affect this filtering mechanism?

View 2 Replies View Related

Automatic Select Filter (something Like Global Table Filter)

Apr 15, 2008

Hello,

Here is my problem:


I use SQL Server 2005. I have approx. 50 tables in my database and 30 of them have a filed named "CompanyID". Example:
create table A (ID int identity, NAME varchar(100), COMPANYID int)create table A (ID int identity, REF_ID int, FIELD1 varchar(100), FIELD2 varchar(100), COMPANYID int)

Also there are nearly 200 stored procedures that read data from these tables. Example:
create procedure ABCasbegin /* some checks and expressions here ... */ select ... from A inner join B on (A.ID = B.REF_ID) where ... /* ... */end;

All my queries in the Stored procedure does not filter the tables by CompanyID, so they process the entire data.

However, now we have a requirement to separate the data for each company. That means that we have to put a filter by CompanyID to each of those 20 tables in each query where the tables appear.

Firstly, I put the CompanyID in the context so now its value is accessible through the context_info() function. Thus I do not need now to pass it as a parameter to the stored procedures.

However, I don't know what is the easiest and fastest way to filter the tables. Example:

I modified the above mentioned procedure in the following way:
create procedure ABCasbegin /* some checks and expressions here ... */
-- gets the CompanyID from the context: DECLARE @CompanyID int; SELECT @CompanyID = CONVERT(float, CONVERT(varchar(128), context_info()))
select ... from A inner join B on (A.ID = B.REF_ID) where ...
and A.COMPANYID = @CompanyID and B.COMPANYID = @CompanyID /* ... */end;

Now I have the desired filter by CompanyID. However, modifying over 200 stored procedures is rather tedious work and I don't think that this is the best approach. Is there any functionality in SQL Server that can provide the possibility to put an automatic filter to the tables.
For example: when I wrote "SELECT * FROM A", the actual statements to be executed would be "SELECT * FROM A WHERE CompanyID = CONVERT(float, CONVERT(varchar(128), context_info()))".

I was looking for something like "INSTEAD OF SELECT" triggers but I didn't manage to find any answer.

I would very grateful is someone suggests a solution for something like "global table filter" (that will help me make an easy refactoring)?


Thanks in advance.

Best regards,
Beroetz

View 5 Replies View Related

And/or Filter Field Not Enabled In The Group Filter Tab

Jan 26, 2006

Howdy,

I have a table that has a group. In this group, I want to filter by 2 different expressions, concatenated with an OR. BUT I can't change the "And/Or" column value for the first entry because it is grayed out. The column will automatically change to an OR value if both my expression column fields are the same (which I don€™t want) but if I put any other value in to the expression field of the second row, the "And/Or" field of the first row automatically changes to an AND.

PLEASE! How do I get the And/Or field "ungrayed" so I can change it to what I want?

The 2 filters I and using check the UserID = to the user, and the other is checking a count to get the Top N 1. (So just showing the current user and the top producer)

View 14 Replies View Related

SQL Server 2008 :: Populate One Dataset In SSRS Based On Results From Another Dataset Within Same Project?

May 26, 2015

I have a report with multiple datasets, the first of which pulls in data based on user entered parameters (sales date range and property use codes). Dataset1 pulls property id's and other sales data from a table (2014_COST) based on the user's parameters. I have set up another table (AUDITS) that I would like to use in dataset6. This table has 3 columns (Property ID's, Sales Price and Sales Date). I would like for dataset6 to pull the Property ID's that are NOT contained in the results from dataset1. In other words, I'd like the results of dataset6 to show me the property id's that are contained in the AUDITS table but which are not being pulled into dataset1. Both tables are in the same database.

View 0 Replies View Related

Integration Services :: Perform Lookup On Large Dataset Based On A Small Dataset

Oct 1, 2015

I have a small number of rows in a dataset, Table 1.  There is a CLOB on a large dataset, Table 2.  They join on a PK.  I would like to retrieve this CLOB and add it to the data flow for Table1.  In short I want to emulate the following:

Table 1:  Small table without CLOB, 10 rows. 
Table 2: Large table with CLOB, 10,000,000 rows

select CLOB
from table2
where pk = (select pk from table1)

I want this to return the CLOBs for the small number of rows in Table 1.  The PK is indexed obviously so it should be a fast look up.

Table 1 and Table 2 live on different Oracle databases.  How do I perform this operation efficiently in SSIS?  It seems the Lookup and Merge Join wont do this.

View 2 Replies View Related

Reporting Services :: Populate One Dataset In SSRS Based On Results From Another Dataset Within Same Project?

May 27, 2015

I have a report with multiple datasets, the first of which pulls in data based on user entered parameters (sales date range and property use codes). Dataset1 pulls property id's and other sales data from a table (2014_COST) based on the user's parameters.

I have set up another table (AUDITS) that I would like to use in dataset6. This table has 3 columns (Property ID's, Sales Price and Sales Date). I would like for dataset6 to pull the Property ID's that are NOT contained in the results from dataset1. In other words, I'd like the results of dataset6 to show me the property id's that are contained in the AUDITS table but which are not being pulled into dataset1. Both tables are in the same database.

View 3 Replies View Related

How Can I Use SQL Reporting Services To Get A Dynamic Dataset From Another Web Service As My Reports Dataset?

May 21, 2007

I found out the data I need for my SQL Report is already defined in a dynamic dataset on another web service. Is there a way to use web services to call another web service to get the dataset I need to generate a report? Examples would help if you have any, thanks for looking

View 2 Replies View Related

Listing Datasets In Report (dataset Name, Dataset's Commands)

Oct 12, 2007



Is there any way to display this information in the report?

Thanks

View 3 Replies View Related

Dataset.Tables.Count=0 Where There Are 2 Rows In The Dataset.

May 7, 2008

Hi,
I have a stored procedure attached below. It returns 2 rows in the SQL Management studio when I execute MyStorProc 0,28. But in my program which uses ADOHelper, it returns a dataset with tables.count=0.
if I comment out the line --If @Status = 0 then it returns the rows. Obviously it does not stop in
if @Status=0 even if I pass @status=0. What am I doing wrong?
Any help is appreciated.


ALTER PROCEDURE [dbo].[MyStorProc]

(

@Status smallint,

@RowCount int = NULL,

@FacilityId numeric(10,0) = NULL,

@QueueID numeric (10,0)= NULL,

@VendorId numeric(10, 0) = NULL

)

AS

SET NOCOUNT ON

SET CONCAT_NULL_YIELDS_NULL OFF



If @Status = 0

BEGIN

SELECT ......
END
If @Status = 1
BEGIN
SELECT......
END



View 4 Replies View Related

How To Transfer Data From One Dataset To Other Dataset

Apr 11, 2008

i have two datasets.one dataset have old data from some other database.second dataset have original data from sql server 2005 database.both database have same field having id as a primary key.i want to transfer all the data from first dataset to new dataset retaining the previous data but if old dataset have the same id(primary key) as in the new one then that row will not transfer.
but if the id(primary key) have changed values then the fields updated with that data.how can i do that.
 

View 4 Replies View Related

Reporting Services :: IF Statement If Dataset Field Value Equals Value Of Dataset Field

Sep 3, 2015

Using this IIF statement:

=CountDistinct(IIF(Fields!Released_DT.Value = Fields!Date2.Value, Fields!Name.Value,
Nothing))
Released_DT = a date  - 09/03/2015 or 09/02/2015
Date2 = returns another date value in this case 09/03/2015

What I'm trying to do is: count distinct number of people (Fields!Name.Value) if the Relased_DT = Date2.My IIF statement is returning a zero value.

View 4 Replies View Related

Using Parameter From XML DataSet In Another XML DataSet

Apr 5, 2007

Hi every body...
I have a probleme
I have a web Services which contains a method getValue(IDEq (int), idIndicator(int), startTime(dateTime), endTime(dateTime))
I need to call this method. But my problem is how pass parameter ?
I see the tab Param but it isn't work as I wait,... maybe I do a mistake...

I want that statTime and endTime are select by the user via a calendar for example...
now idIndicator and idEq was result of an other dataSet from a xml datasource...

But I don't how integrate dynamically... I try to enter a parameter via the param tab, and create and expression :
=First(Fields!idEq.Value, "EquipmentDataSet")
but when i execute the query, the promter display <NULL>...
So I don't know how to do and if it is possible !
I hope someone can help me !
Thank you !

View 3 Replies View Related

Dynamic Dataset For Another Dataset!

Dec 3, 2007

Hi experts,

I'm not sure my design is normal or not. Please give me some advice.

I've a dataset and query by a field name 'companyid'.

select * from companyid where companyid = @icompany which @icompany is a input field.


if user select all, i'll send 0 to @icompany then I need to select all records.

question 1. How can I get all records? (i think about this query select * from companyid <> 0)

if user select for example companyid = 1, i'll send 1 to @icompany and the query work fine.

question 2. How can I change the query to adopt this 2 condition?

Thanks a lot,

Jeff

View 8 Replies View Related

Filter Help

Feb 3, 2007

Hello I am working in an advertising company and I have to find all records who have advertised 7 days back but if one person has advertised more than once means for different products, his name should come only once. How can I filter this. I am totally new to this language I can write simple query but don’t know how to filter it.
Name IndividualID Product Date
A 1 x 2007-01-27.23.59.59.777
A 1 y 2007-01-28.00.00.00.000

b 2 xx 2007-01-28.00.00.00.000

A 1 z 2007-01-28.00.00.00.000

b 2 yy 2007-01-28.00.00.00.000

A 1 p 2007-01-28.00.00.00.000

c 3 m 2007-01-28.00.00.00.000

d 1 n 2007-01-28.00.00.00.000

A 1 s 2007-01-28.00.00.00.000

View 1 Replies View Related

Filter On ' In Name

May 17, 2007

Hi,
I have a supllier named K O'Neill and i want to filter on his name in my supplier table . Is this possible ?

When I try Vend Name = 'K O%Neill' it does not work.

Can anyone help?


Thanks.

View 6 Replies View Related

Filter

Aug 21, 2006

I need a query that returns every n record from the database and the last record.
For every n-th is easy, but I need a
WHERE Index % n = 0
but I need a last one too.
Any Help.

View 3 Replies View Related

Filter &&amp; *

May 24, 2007

Hi I am wandering if it is possible to achieve the following:

I am using Reporting Services and Reporting services I got a report with a text parameter.
I would like the user to introduce AA and find the product AA and when he introduces AA* it finds AA, AAD, AAC...

I am doing the following:

Filter([DIM Product].[Product].ALLMEMBERS,
,IIF(INSTR(@Product, "*") > 0
,[DIM Product].[Product].currentmember.name = Replace(@Product, "%", "")
,INSTR([DIM Product].[Product].currentmember.name, @Product)
)
)

The problem ist that the function Replace does not work!

Does someone know how to do it?

View 1 Replies View Related

Using IN As Filter

May 22, 2007

What is the syntax for using IN as a filter? in SQL it would be IN( 'A', 'B', 'C') but this does not work in Reporting services.

View 4 Replies View Related

Formatting A Filter

Jun 9, 2008

In a SQLDataSource, the following line throws an error as an undefined function. FilterExpression='left$(lname,1) = "D"'
 Isn't this a standard VB function and why does it produce an error. How do I fix?
Thanks

View 2 Replies View Related

How To Filter Sqldatasource

Jun 8, 2006

Hi,
I am new in framework 2 and I can't find a way to filter the sqldatasource.
I have an sqldatasource control that retrive data from data base-"Select * from myTable"
I set the fiterExpression property-sqlDataSource1.FilterExpression="ID='" + strID + "' " ;
I don't know how to continue from here.If  I bound the  sqlDataSource1 to a control like gridView it works good and I see the filter oparation. but I want to get the result set  in the code and loop threw it like I did with ver 1.1 with sqldataReader:
While sqlDatareader1.Read {  myCode ... }
How can I do it with sqlDataSource ?
Thanks,
David
 
 
 

View 4 Replies View Related

JOIN Filter

Aug 24, 1999

I have two tables A and B. I want to insert data into tables C and D based on join between A and B (A.column = B.column). What is the best way to accomplish this type of task?

IE-------> If column = xyz then insert into table C
IF column = abc then insert into table D
ELSE do_not_insert

Please help.
Regards

Ziggy

View 1 Replies View Related

Profiler Filter

Sep 15, 2004

I have been running traces in SQL Profiler and have not been able to get the filtering to work correctly. I am interested in capturing only statements that use CPU and have setup the filter for CPU > 0. It still returns all of the rows that have Null. Is there any way of filtering out the rows that have nunll for CPU?

Thanks,
Ken Nicholson

View 2 Replies View Related

How Do I Add A Filter To This Query?

May 3, 2006

I'm an MDX newbie.. with some help I was able to create a query that returns accurate results. All I need to do now is filter for Completed Work value of greater than 0.


I have tried to use the filter wizard in VS2005, but I have never gotten the desired results.




Platform Info:
SQL Server 2005 Standard
VS2005



---------Start Statement----------------------------------------------------------
WITH

MEMBER [Measures].[Completed Work by WI on dt1] AS

(

[Assigned To].[Person].CurrentMember,

[Work Item].[System_Id].CurrentMember,


[Date].[Year Week Date].[Date].&[2006-04-23T00:00:00],

[Measures].[Microsoft_VSTS_Scheduling_CompletedWork]

)

MEMBER [Measures].[Completed Work by WI on dt2] AS

(

[Assigned To].[Person].CurrentMember,

[Work Item].[System_Id].CurrentMember,

[Date].[Year Week Date].[Date].&[2006-04-29T00:00:00],

[Measures].[Microsoft_VSTS_Scheduling_CompletedWork]

)

MEMBER [Measures].[Completed Work] AS

[Measures].[Completed Work by WI on dt2] - [Measures].[Completed Work by WI on dt1]

SELECT
NON empty
{
[Measures].[Completed Work]

}

ON COLUMNS,

NON EMPTY

{
([Assigned To].[Person].[Person],[Work Item].[System_Id].[System_Id],[Work Item].[System_Title].[System_Title])


}

ON ROWS

FROM

[Team System]

----------End Statement---------------------------------------------------

View 1 Replies View Related

Filter Date

Jun 9, 2004

I got a field called Date#, datatype = datetime, default value = getdate().

So after i insert a record, the Date# will auto record the system date and the time. And my MS SQL Server show: 6/9/2004 12:24:35 PM

However i am not able to filter my record by date. The statement i tried are:

SELECT * from mytable WHERE Date# = '6/9/2004 12:24:35 PM'

SELECT * from mytable WHERE Date# = "6/9/2004 12:24:35 PM"

SELECT * from mytable WHERE Date# = 6/9/2004 12:24:35 PM

SELECT * from mytable WHERE Date# = '6/9/2004'

Pls help me,
Thanks a million

View 13 Replies View Related

Filter A Measure With MDX

Dec 27, 2005

HI all friends


I have a Fact table like this



DIMENSSIONSMEASURES
------------------------------
idempidprodcutsalessalesws




I just want make the next query with MDX


SELECT sales
FROM myFactTable
WHERE salesws > 0


Note that salesws is a measure not a dimmension


How it would be in MDX? I need a lot of help


Regards!

View 4 Replies View Related

Time Filter

Feb 6, 2006

Hi,
I need to filter my table to return data between 18:30 and 7:00

I am not sure how to do the half hour and span over midnight.

I think this might work for 18:00 and 7:00.

SELECT *
FROM MyTable
WHERE datePart(hour, Timestamp) Between 18 AND 24 Or datePart(hour, Timestamp) Between 00 AND 7

I would appreciate any help!

Thanks

View 5 Replies View Related

Problem With Like Filter.

Mar 15, 2008

I have a table with a varchar in it.

Inside the var char it contains data like:

Variable.[32] + Variable.[432] * (Variable.[333] / Const.[21])

What I am trying to do is search for all records that are using variable 333

I was trying:

SELECT * FROM my_table WHERE data_field LIKE '%Variable.[333]%'

However, that returning nothing.

I am going to guess that the [ ] need to be escape or something, but I don't know if thats really the issue.

Doing:

SELECT * FROM my_table WHERE data_field LIKE '%Variable%'

Works.

Thanks in advance,
Rich

View 2 Replies View Related

Where Clause Filter

Apr 14, 2008

I have an sql script that has 2 main blocks of Where filter which I'd call as Filter1 and Filter2 as follows:

Select
DisplayColumns...
From
InterestingTables
Where
(Filter1) --W1
AND --W2
NOT --W3
(Filter2) --W4

Note that Filter1 and Filter2 are composite filters (inner filters nested; it shouldn't matter as long as I have the outer parenthesis as above, right?).
Now, say SetF1ExF2 is the result set of the sql script above.
Additionally, let's say I obtain the result set SetF1 by having W2 to W4 commented out and SetF1AndF2 comes from commenting out W3.
Shouldn't the following hold: SetF1AndF2 = SetF1 - SetF1ExF2
I am having a discrepancy between the values with SetF1AndF2 < SetF1 - SetF1ExF2.

TIA.

View 1 Replies View Related

FILTER For MDX Query

Feb 17, 2012

I've got an MDX query I need to modify, but not quite sure how to proceed. I essentially know most of tye syntax, but am at a loss as to where the components of the syntax should appear in the query. Here is the original query:

Code:

WITH
MEMBER [Employee].[FTE vs FL].[CF Total] AS AGGREGATE([Client Facing Disciplines])
MEMBER [Time].[Year - Half Year - Quarter - Month - Date].[Trailing 12 Months] AS AGGREGATE(LASTPERIODS(60, STRTOMEMBER(@SelectedMonthEx, CONSTRAINED)))
MEMBER [Time].[Year - Half Year - Quarter - Month - Date].[YTD] AS AGGREGATE(YTD(STRTOMEMBER(@SelectedMonthEx, CONSTRAINED)))

[Code] ....

This is how I'm sure the two lines that say what should be excluded, I'm just not sure where they should go. I believe a FILTER statement is what I need, but not sure how to format it.

[Employee].[FTE vs FL].[Discipline].&[LOYALTY],
[Employee].[FTE vs FL].[Discipline].[Department].&[OLSON PR Chicago]

MDX is definitely not my strong point.

View 4 Replies View Related

Having Filter Problem

Apr 3, 2008

Hi ,
account_desc_out,Analysis_Desc_out,Sub_Analysis_Desc_out,debit_out,
credit_out,sub_Analysis_Code_out,Analysis_Code_out
-----------------------------------------------

11066-0001-01 GEN 6633 0.00000000 160.000000006633GEN

11066-0001-01 GEN 6633 160.00000000 0.000000006633GEN



When i run the below query the o/p is comming as above:actually no record should come bcz debit amt and credit amt should knock off .can anyone correct the below query:

select
account_code_desc as'Account_Desc_out',
analysis_code_Desc as'Analysis_Desc_out',
subanalysis_code_desc as 'Sub_Analysis_Desc_out',
case when drcr_flag='dr' then sum(isnull(base_amount,0)) else 0.00 end as 'debit_out',
case when drcr_flag='cr' then sum(isnull(base_amount,0)) else 0.00 end as 'credit_out',
subanalysis_code as 'sub_Analysis_Code_out',
analysis_code as 'Analysis_Code_out'
from Analysis_stg_tb as stg with (NOLOCK)
where subanalysis_code_desc='6633-Goverdhan S'
group by subanalysis_code,analysis_code,
account_code_desc,analysis_code_desc,subanalysis_code_desc,drcr_flag
having sum(case when drcr_flag='cr' then isnull(base_amount,0) else 0.00 end) -
sum(case when drcr_flag='dr' then isnull(base_amount,0) else 0.00 end)<>0
order by Account_Desc_out,Analysis_Desc_out,Sub_Analysis_Desc_out

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved