Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Vadz
Starting Member
11 Posts |
Posted - 2012-12-13 : 15:15:30
|
if my table is like this in my databaseStudent Staff children34 104 playing34 104 playing 34 104 rugby 34 104 soccer 34 104 playingi want the value 34 to assign only to playing, if rugby or soccer it should be 0 or empty set and staff(1024) to assign only to rugby and soccer.i was wondering can i do this in my expression if i have =Fields!XXX.value. if not how can i write this in query.i query and display my tables as this.which is fine.and value of 34 and 104 a constant value.my final table result i want to be like thisStudent Staff children34 0 playing34 0 playing 0 104 rugby 0 104 soccer 34 104 playingthanks in advance |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-14 : 03:18:39
|
Use IIF=IIF(Fields!children.value = "playing",Fields!Student.value,0)for student and=IIF(Fields!children.value = "rugby" Or Fields!children.value = "soccer",Fields!Staff.value,0)for Staff------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|