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 ««12

Query help for Data pulling Expand / Collapse
Author
Message
Posted Wednesday, April 3, 2013 4:13 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, April 24, 2014 8:19 PM
Points: 56, Visits: 240
Hi the below query
Cost == "DRU" ? Values : NULL(DT_I4)

giving null values..could you please help me
Post #1438610
Posted Sunday, April 7, 2013 10:14 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, September 19, 2014 2:29 PM
Points: 1,481, Visits: 1,031
Don't know if you have this figured out yet or not.
Lets break down the expression

Cost == "DRU" ? Values : NULL(DT_I4)
Cost=="DRU" is the expression or if statement if you will.
So if the Cost value for the row your on = "DRU"

? = use the value if True,
: = Use the Value if Fales

So here's what I see when running your sample data.
Server DRU
SAB245 200
SAB246 2001
SAB247 NULL
SAB248 NULL
SAB249 NULL
SAB250 NULL
Post #1439652
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse