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 |
|
jonasalbert20
Constraint Violating Yak Guru
300 Posts |
Posted - 2005-03-08 : 02:16:59
|
| [code]good day to all...i had this data...select * from tblAydzzprefixes MyString ExpressionZA ABCDE TrueZA WXYZM TrueLO LOUAI TrueMN LOUAI FalseI want to return an expression TRUE if any character on prefixes is found on MyString else FALSE.[/code]Want Philippines to become 1st World COuntry? Go for World War 3... |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-03-08 : 04:17:43
|
have you tried adding a where clause in your sql statement?you can use charindex or patindex for pattern matching.quote: Originally posted by jonasalbert20
good day to all...i had this data...select * from tblAydzzprefixes MyString ExpressionZA ABCDE TrueZA WXYZM TrueLO LOUAI TrueMN LOUAI FalseI want to return an expression TRUE if any character on prefixes is found on MyString else FALSE. Want Philippines to become 1st World COuntry? Go for World War 3...
--------------------keeping it simple... |
 |
|
|
jonasalbert20
Constraint Violating Yak Guru
300 Posts |
Posted - 2005-03-08 : 04:48:12
|
| please can u show me how... tnx....Want Philippines to become 1st World COuntry? Go for World War 3... |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-08 : 05:23:11
|
select * from tblAydzzwhere charindex(left(prefixes, 1), MyString)>0 or charindex(right(prefixes, 1), MyString)>0Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|