February 19, 2003 at 7:20 am
Hi everyone,
I am writing a sproc for reporting purposes:
I do a simple select with a user filter from a posted table to generate the data needing to be displayed. I just received a request to add some logic linking the posted record to the transactional record.
I do not need any columns from the transactional table currently (they may change that). How do I bring in the link between the transactional record and the posted record? Is it in a join? Please help?
Christine Aurora
February 19, 2003 at 7:42 am
February 19, 2003 at 7:47 am
How do I bring the join in if I am not including a column in the select? Would I do a LEFT OUTER JOIN?
Sorry for the simplistic questions I'd know right off the rip if I had some data to work with but other DBA's are currently working on the build.
February 19, 2003 at 11:21 am
quote:
How do I bring the join in if I am not including a column in the select?
You don't need to include the JOIN column in the select for the JOIN to work:
SELECT PostedTableField
FROM PostedTable
INNER JOIN TransactionTable
ON PostedTable.JoinKeyField = TransactionTable.JoinKeyField
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply