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 |
|
TGarmon
Starting Member
18 Posts |
Posted - 2002-03-15 : 17:27:02
|
| I have two tables. One called VNDR with the information below in it.VNDR_Num VNDR_Code VNDR_Subcode VNDR_Seqabc123 2 12 1abc123 2 9 2abc123 2 13 3xyz 2 25 1Another called FLDS:FLDS_Code FLDS_Subcode2 142 252 92 132 123 14I am needing a query that will select ALL FLDS_Subcode where FLDS_Code is equal to VNDR_Code based on VNDR_Num. Here is the part I am having trouble with: I need the VNDR_Seq displayed next to corresponding FLDS_Subcode. This is what I am looking for:FLDS_Subcode VNDR_Seq14 259 213 312 1Can this be done? |
|
|
yahazim
Starting Member
13 Posts |
Posted - 2002-03-15 : 18:20:01
|
| <where FLDS_Code is equal to VNDR_Code based on VNDR_Num>You really have to be clearer with this statement.1) Is VNDR_Num a foreign key? If so how come it's not in the VNDR table?2) Or, are you just matching records FLDS_Code = VNDR_Code???? |
 |
|
|
AK
Starting Member
27 Posts |
Posted - 2002-03-18 : 13:12:07
|
quote: how about:select FLDS_Subcode, VNDR_Seqfrom FLDS left join VNDRon FLDS.FLDS_Subcode=VNDR.VNDR_Subcode
|
 |
|
|
|
|
|