Vote count: 0
I am trying to create a parameter for this particular select statement where the field contains a letter. Here is my code:
if ({?Types of S Fields}="S") then {tablename.field} like 's*'
else if ({?Types of S Fields}="T") then {tablename.field} like 't*'
else if ({?Types of S Fields}="V") then {tablename.field} like 'v*'
else ({?Types of S Fields}="All") then {tablename.field} like ['s*','t*','v*']
Here is my sql statement combining the 3 queries from sql management studio:
select * from table where field like '%s%'
union
select * from table where field like'%t%'
union
select * from table where field like '%v%';
asked 32 secs ago
Crystal Reports union of 3 sql select statements
Aucun commentaire:
Enregistrer un commentaire