Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command breaks other left outer joins 1

Status
Not open for further replies.

markphillipscpa

IS-IT--Management
Nov 2, 2006
8
US
Can a (database) command effect other joins in a report? I added a command to a report, and then other left outer joins in the report return no information.

The command is not the primary table of the report. Command is left outer -ed to the primary table.

The other left outer tables are not included in the command.

the offending command is :
SELECT DISTINCT "POLINESRC"."COMPANY", "POLINESRC"."PO_NUMBER",
"POLINESRC"."PO_RELEASE", "POLINESRC"."PO_CODE", "REQHEADER"
."REQ_NUMBER", "REQHEADER"."REQUESTER", "REQHEADER".
"PO_USER_FLD_3", "REQHEADER"."ACTIVITY", "REQHEADER".
"ACCT_UNIT"

FROM "PRODUSER"."POLINESRC" "POLINESRC" INNER JOIN "PRODUSER"."REQHEADER" "REQHEADER" ON ("POLINESRC"."COMPANY"="REQHEADER"."COMPANY") AND ("POLINESRC"."SOURCE_DOC_N"="REQHEADER"."REQ_NUMBER")


 
Crystal formulas stop on a null, so if you do a selection on a record that may not be there, the field values will be null and the selection will stop.

You can get over this by testing for Null. Better coded in Crystal using IsNull than in SQL, which is what you've shown.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top