SQL where Clause help needed
-
Hi Can anyone advise/help me with the following I am trying to Select from table where xfield HAS either (,),/,%, : in the first 3chars For instance, the query should return the row G1: darararararararar and not G12 easfsafsafsfsfsfsfsf Thanks in advance
-
Hi Can anyone advise/help me with the following I am trying to Select from table where xfield HAS either (,),/,%, : in the first 3chars For instance, the query should return the row G1: darararararararar and not G12 easfsafsafsfsfsfsfsf Thanks in advance
Can you explain more your question?
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Hi Can anyone advise/help me with the following I am trying to Select from table where xfield HAS either (,),/,%, : in the first 3chars For instance, the query should return the row G1: darararararararar and not G12 easfsafsafsfsfsfsfsf Thanks in advance
-
Hi Can anyone advise/help me with the following I am trying to Select from table where xfield HAS either (,),/,%, : in the first 3chars For instance, the query should return the row G1: darararararararar and not G12 easfsafsafsfsfsfsfsf Thanks in advance
How about
where instr(substr(xfield,1,3),'(') > 0
or instr(substr(xfield,1,3),')') > 0
or instr(substr(xfield,1,3),'/') > 0
or instr(substr(xfield,1,3),'%') > 0
or instr(substr(xfield,1,3),':') > 0Can't remember if the % or : character need to be escaped. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]