Microsoft
Software
Hardware
Network
Question : Need Help with SQL Query
Hello experts! Here are 3 tables, of which I need to select from, hoping you can help me!
Table1:
USERID NAME
341 John Smith
342 Jack Benson
343 Lucy Doe
TABLE2:
USERID CITY USEADDRESS
341 Anaheim 1
341 Los Angeles 2
342 Seattle 1
343 Los Angeles 1
TABLE3:
USERID ADDRESSNumber Address
341 1 123 Jack Street, Anaheim CA
341 2 242 Division, Los Angeles CA
342 1 11 Smith St. Seattle, WA
343 1 100 Jay Street, Los Angeles CA
I need to select from table 2 WHERE CITY = LOS ANGELES
And pull the following data:
341 John Smith 242 Division, Los Angeles CA
343 Lucy Doe 100 Jay Street, Los Angeles CA
Can someone help me with the statement?
(basically John has 2 addresses, and when I pull from Los Angeles, I need Address #1)
UserID's are unique and uniform across all tables.
Answer : Need Help with SQL Query
than why don't you use = rather than IN
select t1.userid,t3.address,t2.ci
ty from table1 t1 join table2 ts on t1.userid=t2.userid join table3 t3 on t2.USEADDRESS=t3.ADDRESSNu
mber
where t2.city ='Anaheim'
Random Solutions
XP SP3 unable to burn to hp 740b dvd
Powershell Script to Copy Folder Structure from one Server to another.
asp .net: call a sql job?
Error 1327 Invalid Drive - installing applications - "Documents" on network drive - offline file sycn
Windows 7 Partition
Drop all Indexes
access 2003 report with calculated field.
MS Access 2007 Customize Office Menu Button
Microsoft Excel and PowerPoint 2003 print with no left margin
MSSQLSERVER unhandled exception 80000003, Error: 17311, Severity: 16, State: 1, SQL 2005, Windows 2008