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 |
dnpmoris
Starting Member
23 Posts |
Posted - 2006-07-31 : 17:07:05
|
HiThis query is not working. So, pls help me I need to retrieve the information likeNeed All the rows that end with .gif or the rows that end with .jpg belongs to the same table.SELECT SFHomePage_HTTPWatch_V3.ShortURL, SFHomePage_HTTPWatch_V3.FullURLFROM SFHomePage_HTTPWatch_V3WHERE SFHomePage_HTTPWatch_V3.ShortURL=*.gif || SFHomePage_HTTPWatch_V3.ShortURL=*.jpg ; |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2006-07-31 : 23:20:05
|
The equality operator does not work with wildcards. You need to use the LIKE() function, or use right(SFHomePage_HTTPWatch_V3.ShortURL, 3) to peel off the extension for direct comparisons. |
 |
|
KenW
Constraint Violating Yak Guru
391 Posts |
Posted - 2006-08-01 : 14:53:56
|
Duplicate article: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=69795 |
 |
|
|
|
|