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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CTE Missing

Status
Not open for further replies.

codrutza

Technical User
Mar 31, 2002
357
0
0
IE

I wrote a basic stored procedure from TableJ, that selects all jobs and I developed a report with Crystal Reports which shows the jobs with missing vessels, missing dates,….. Each job has one vessel, one date, …

1. Some jobs with the field value TableJ.car='F' have one or more containers,
2. some jobs with the field value TableJ.car='F' don’t have containers yet,
3. and some jobs with the field value TableJ.car='L' don’t have containers, they have boxes in the TableJ.

I have the containers in TableC.

TableJ is linked with TableC through the JobNo and I have outer join on TableC. TableC doesn’t have the JobNo until the users input the containers in the system.

So I wrote a CTE that retrieves the count of the containers (the container is type char) for a job from TableC and I have in the report a formula: if the count is 0, print ‘Missing’. But formula doesn’t work; I tried to put a formula in the report: if is null print ‘Missing’. Still doesn’t work. Obviously I miss something.

Could you help, please?

 
Could you please post some example data and desired result?

Borislav Borissov
VFP9 SP2, SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top