|
-
Sep 10th, 2002, 10:45 AM
#1
Thread Starter
Frenzied Member
help with a query
I have two tables, each with three fields. Each table has a vendor field, but there not going to be identical. I need to search through the vendors if I can find a partial match. I've tried...
SELECT table1.vendor, table2.vendor
FROM table1, table2
WHERE table1.vendor = '%table2.vendor%'
I put in a dummy field that I knew would match just to make sure, but it still didn't return anything...any advice?
thanks,
eye
-
Sep 10th, 2002, 10:55 AM
#2
use LIKE instead of the =
"It's cold gin time again ..."
Check out my website here.
-
Sep 10th, 2002, 10:58 AM
#3
Hyperactive Member
SELECT table1.vendor, table2.vendor
FROM table1, table2
WHERE table1.vendor = '%table2.vendor%'
Try using Like instead of =
WHERE table1.vendor Like '%table2.vendor%'
-
Sep 11th, 2002, 09:48 AM
#4
Thread Starter
Frenzied Member
I've tried that too. Doesn't return anything and I have a dummy record in there that should get returned
eye
-
Sep 11th, 2002, 10:36 AM
#5
Addicted Member
try this then
SELECT table1.vendor, table2.vendor
FROM table1, table2
WHERE table1.vendor like '%'+table2.vendor+'%'
-
Sep 11th, 2002, 10:45 AM
#6
Thread Starter
Frenzied Member
hey doe, tried that query...it just keeps running....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|