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

Select Statement

Status
Not open for further replies.

VickieT

Technical User
Feb 18, 2004
35
US
I am working with medical insurance codes in version 9. In our database we have what we called benefit deduction codes and in this case I'm working with a code called "nomed" which means the employee gets paid a certain amount of premium each month if they decline our medical insurance. It is paid under a premium hourtype called "pnom". (Their are other hourtypes people get paid premiums for such as longevity pay, "plgv", and this will be relevant to my question).

I am grouping on the particular plan and have specified "nomed" only, discard all others.

I have done a select formula which tells crystal to only include the premium code {ESYPREMD.HOURTYPE} = "pnom" but for two employees only it is also including the hourtype "plgv" and I can't figure out why it's including it. I have searched the data by each employee and can see no visible reason why it would pull those codes. Any ideas? Thanks so much,as always, for your help.

Vickie
 
I'm sorry, I don't know the answer to your question, but it might be worth getting the SQL query from the report (in the Database menu) and running it directly on your database - this might help you to figure out what it is doing.
 
Sounds like you need to deconstruct a little here.

Try a few things:

a) Go to the Database menu, and Verify Database, and run the report again.
b) Like Katy suggested, if (a) doesn't work, extract the query and run it directly on the database and see if the output is different to what Crystal returns.
c) Try rephrasing your selection criteria in Crystal and examine the effects. (e.g. Do these guys come back when {ESYPREMD.HOURTYPE} = "plgv"? Is there a change to the records returned if you invert the logic by excluding stuff instead using '='? Not {HourType} in ['plgv','xxx',yyy','zzz'])

Performing one or a series of the above or additional tests should put the answer in your hand, or at least take you closer to it.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top