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 |
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-20 : 15:12:30
|
Is it possible to have conditional expression that uses 'LIKE'. Example:=IIF(Fields!ID.Value LIKE "SP%", Fields!ID.Value, Fields!Parts.Value) |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-05-20 : 15:16:46
|
For this, just use the VB.NET Substring function.Tara |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-20 : 15:38:38
|
Can this be done in conditional expression or do I have to do this in custom code section? Also how would this work if in conditional expression. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-05-20 : 15:42:15
|
Yes it can be done in a conditional expression. VB.NET functions can be called from there. Google VB.NET Substring to see examples of the function call.Tara |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2005-05-20 : 15:53:25
|
Okay, got it now. It was pretty easy so if anyone needs it, here's an example. Will save you time looking all over for it. =IIF(Fields!PART_ID.Value LIKE "PO:*", Fields!ID.Value, Fields!PART_ID.Value) |
 |
|
|
|
|