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 |
Maddocks
Starting Member
8 Posts |
Posted - 2006-04-18 : 15:13:39
|
i have posted this here because it is concerning mysql, here is my problem:i have setup a search script which searches one table and this works fine. Now, i want the script to search two tables, the tables have the same structure and i want the script to select from the "Name" column in both tables. I have tried using a select statement for two tables but receive this error: Column 'Name' in where clause is ambiguous. I heard that this means the script doesnt know which table to search as they both have the same column name. I want it to search both. Here is my select script:select * from downloads_anti ,downloads_multi where Name like \"%$trimmed%\"any suggestions would help me greatly thanks.http://pchelpworld.awardspace.com < Free PC/PSP Forums - no signup required |
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2006-04-18 : 15:23:23
|
Then you need to us an OR statement Where dbo.downloads_anti.name Like \"%$trimmed%\" Or dbo.downloads_multi.name \"%$trimmed%\"JimUsers <> Logic |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|