INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

CTE Missing

CTE Missing

(OP)

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?

RE: CTE Missing

Could you please post some example data and desired result?

Borislav Borissov
VFP9 SP2, SQL Server

RE: CTE Missing

(OP)
Thank you Boris. Sorted :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close