Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Parameter Eqaul to or Not Equal to Expand / Collapse
Author
Message
Posted Wednesday, September 4, 2013 10:44 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, May 7, 2014 7:04 AM
Points: 37, Visits: 103
Hi,

I am faced with a problem.

I am trying to create a parameter that gives the choice, for example: I want all cars that have tinted windows, and all cars without tinted windows.

So I was thinking that it would be nice if I could create a parameter with = and <> . Unfortunately I am running into problems.

Any help is appreciated
Post #1491434
Posted Wednesday, September 4, 2013 11:31 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 3:09 PM
Points: 215, Visits: 636
Are you writing a store procedure for it?
Post #1491461
Posted Wednesday, September 4, 2013 11:37 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, May 7, 2014 7:04 AM
Points: 37, Visits: 103
No I didn't.

So far I wrapped my query in an expression and used a paramater within the expression. Works, but is slow
Post #1491462
Posted Thursday, September 5, 2013 6:22 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 1:50 PM
Points: 532, Visits: 448
Are there any defining characteristics in the data that you can key in on and use in a case statement so you can assign a Y or N (or something meaningful to you) value to each record, indicating if it is tinted or not?
Post #1491746
Posted Thursday, September 5, 2013 10:25 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, May 7, 2014 7:04 AM
Points: 37, Visits: 103
Here is what I did:

Example:

SELECT Manufacturer, Model
FROM CARS
WHERE Manufacturer = @Manf AND Model = '2 door'

Here is what I wanted a prompt for Model = '2 door' or Model <> '2 door'

I created a prompted with two option

Label Value
2 Door AND Model = '2 door'
Not 2 Door AND Model <> '2 door'

So I took the query and placed it in an Expression - from the Dataset.

="SELECT Manufacturer, Model FROM CARS WHERE Manufacturer = @Manf " & Parameters!Model.Value & " "

You now have a prompt to handle EQUAL to and NOT EQUAL to
Post #1491880
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse