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 |
|
blandow
Starting Member
6 Posts |
Posted - 2011-06-20 : 17:44:13
|
| I have 3 tables that I am working with:distribution_stop_informationdistribution_line_itemsdistribution_scan_item scansI need to write a query that returnsitem#(from line_items)BOL# (from stop_information)Zip (from stop_information)scan type(from item_scans) (there are 3 types: 1,2,9)scan time(from item_scans)I've been crashing and burning...not too good at joins..Anyone up for the challenge?Thanks in advance |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-06-20 : 18:25:22
|
| What links the 3 tables together? Also, is item# a column in your table, or do you want a count of items.JimEveryday I learn something that somebody else already knew |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-06-20 : 18:25:23
|
| What links the 3 tables together? Also, is item# a column in your table, or do you want a count of items.JimEveryday I learn something that somebody else already knew |
 |
|
|
blandow
Starting Member
6 Posts |
Posted - 2011-06-21 : 04:34:15
|
| Sorry - forgot to mention each table has the field 'unique_id' which is the link.And I am wanting to return the data in the previously mentioned fields where company_no = 7808thanks |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2011-06-21 : 11:14:53
|
| ok -- and which table does the company_no column live on?Stop and read your question and then think : knowing nothing else could I even start to answer this question?Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
|
|
|