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 |
Ravi0435
Starting Member
47 Posts |
Posted - 2009-02-09 : 17:54:18
|
Hi:I am creating a report and need to pass a value through global variableso i declared a global variable and in the source i have a query as follows...and destination is an excel sheet.problem is that the query is able to work when i just say --> program_code = ? when i add couple more statements containing substring() it doesnt work.... basically its unable to parse this SUBSTRING(?,6,3)Select * from employees where program_code = ?and (work = SUBSTRING(?,6,3) OR nationality = SUBSTRING(?,6,3))does anyone know if i am committing a mistake somewhere?is there anyother way of achieving this?thanks,RaviNothing much that i can do..!! |
|
|
|
|