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.

 All Forums
 Other Forums
 MS Access
 SQL Help in MS Access DB

Author  Topic 

dnpmoris
Starting Member

23 Posts

Posted - 2006-07-31 : 17:07:05
Hi

This query is not working. So, pls help me

I need to retrieve the information like

Need 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.FullURL
FROM SFHomePage_HTTPWatch_V3
WHERE 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.
Go to Top of Page

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
Go to Top of Page
   

- Advertisement -