Todd wrote:
> In one table I have an ID as the primary key.  In a second table, I have a 
> string that is made out of that ID.  I'm trying to match the two.  The string 
> looks like this:  /folder1/folder2/some_other_stuff_that_changes/123.txt  
> where 123 is the ID from the first table.  How can I match the two using SQL? 
>  I'm trying to get a list of all of the IDs that do not have a url associated 
> with them.

SELECT table1.ID
FROM   table1 LEFT JOIN table2
          ON table2.string LIKE Concat('%/',table1.ID,'.txt')
WHERE  table2.string IS NULL

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186464
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to