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.

 All Forums
 Other Forums
 MS Access
 Select statement, Joins?

Author  Topic 

MikeB
Constraint Violating Yak Guru

387 Posts

Posted - 2002-07-03 : 11:56:54
I have 2 (+) select statements.


(SELECT1)
SELECT * FROM ShippingLoadTable
WHERE ShippingDate = #%s#
AND ProjectNumber = '%s'
ORDER BY Stack ASC


and
(SELECT2)

[SELECT Length, Width, Weight
FROM HollowcorePropertiesTable
WHERE ProjectNumber = '%s'
AND MarkNumber = '%s


now one of the fields in ShippingLoadTable (SELECT1) is the MarkNumber that is the same MarkNumber compared in SELECT2.

How can I Select from the shipping table and while doing that, create a join or something that will automatically give me Length, Width, Weight, that I want from the second select statement?

Any help with this?

Mike B



M.E.
Aged Yak Warrior

539 Posts

Posted - 2002-07-03 : 12:53:15
think you can post the table layouts for us? Hard to give a straight out answer without a little more info.

-----------------------
Take my advice, I dare ya
Go to Top of Page

MikeB
Constraint Violating Yak Guru

387 Posts

Posted - 2002-07-03 : 13:08:01
Table layouts?

ShippingLoadTable

ListID | ShippingDate | ProjectNumber | MarkNumber | LoadNumber | Stack | Level | Position

*Note: ProjectNumber and MarkNumber are text values (because they can be alpha numeric)

HollowcorePropertiesTable

ProjectNumber | MarkNumber | .... | Length | Width | Weight

Does this help?

Mike B



Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-07-04 : 01:56:23
Posts in other thread
http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=17408

Damian
Go to Top of Page
   

- Advertisement -