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

CR8.5 - Show SQL Query

Status
Not open for further replies.

YA

Programmer
Aug 13, 2001
37
US
Hello

I am using CR8.5 and trying to modify a sql query directly in the Show SQL Query window. I changed WHERE part of the query but the change did not get reflected when running the report again..Do I have to do something else?

Thanks for your help in advance..
 
I caution against doing that as you will lose the ability to use the experts to add in tables, etc. in the future.

Use the record selection formula, or Views/SPs whenever poossible.

When you check the Show SQl Query, does it still have the change?

If so, then it's there.

Consider posting what you're trying to do overall.

-k
 
Hi Synapse

Thanks for your response!
I am trying to modify the sql in the subreport.

The record selection formula looks like this:

{EMPLOYEES.ID} = {?Pm-EMPLOYEES.ID}and
{CLASSES.ID} = {?Pm-CLASSES.ID}


The sql looks like this under "Show SQL Query"

SELECT
EMPLOYEES."ID",
CLASSES."ID",
QUESTION."NAME"
FROM
CLASSES,
EMPLOYEE,
QUESTION
WHERE
(QUESTION."NAME" = 'Choice 10' OR
QUESTION."NAME" = 'Choice 14' OR
QUESTION."NAME" = 'Choice 16')
ORDER BY
TPV_PUB_SMP_EMPLOYEES."ID" ASC,
TPV_PUB_BASE_CLASSES."ID" ASC


What I am trying to do is to insert "QUESTION."NAME" = 'Choice 12' OR" in the WHERE part. After saving it, it still had the change but the formatting got messed up like this:

SELECT
EMPLOYEES."ID",
CLASSES."ID",
QUESTION."NAME"
FROM
CLASSES,
EMPLOYEE,
QUESTION
WHERE
QUESTION."NAME" = 'Choice 10' OR QUESTION."NAME" = 'Choice 12' OR QUESTION."NAME" = 'Choice 14' OR QUESTION."NAME" = 'Choice 16' OR
ORDER BY
TPV_PUB_SMP_EMPLOYEES."ID" ASC,
TPV_PUB_BASE_CLASSES."ID" ASC

However, the change did not get reflected to the data shown on the report..

I removed the entire code in the WHERE clause and put it in the record selection formula. The weird thing is that QUESTION."NAME" for choice10,14, and 16 showed up but NOT choice12..

 
Its not a major issue but can anyone help me on this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top