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!

Problem with SQL query

Status
Not open for further replies.

subbulu

Programmer
Aug 23, 2002
20
US
Hi Guys,
I am working on a pharmaceutical project.
I have a problem like there is 2 tables like case_event and case_pe.I have to display 3 fileds like desc_reported,serious and serious_death by comparing determined_causality.
I have to display the total cases of each type of desc_reported also serious and serious_death.
I have to retrieve all three fileds depends on Causality.
there are three cases like one is if causality is true,second one is false and last one is none.
also I have to count total on each column vise.
I have done this by custom SQL Query,but I am not able to do all totals of columns.
after I done this by SQL query lot of options r becoming disable.
Is there any solution to do this directly in IMPROMPTU.
I apprciate for ur great help.
Thanx in Advance.








 
From my experience and from what I've been told, once you do custom SQL, there's no way of going back to the default Query interface for that report. If there is a way, I'd like to know too.
 
Thanx for replying.
As my knowlege there is no option to get enable them.
Do u have any idea to do that problem by without using SQL query.
I would apprciate for ur great help.
Thanx in advance.
 
There is no way to go back to the graphical interface from a custom SQL.

 
Thanx for replying.
do u have any idea to do that problem without using SQL Query.
I would apprciate for ur quick response.
Thanx in Advance.
 
I just played around with some of my ideas.

It looks like the only way that you can do totaling is if you wrote the SQL yourself. (Once you go into custom SQL mode, Impromptu lets you generate the SQL and discontinues its SQL generator GUI. I believe the reasoning behind this is it would be very difficult for Impromptu's SQL generator to adapt to your SQL statement and then modify it.)

Once you have the results, you can format them (such as client-side grouping, sorting, headers,...) however you like -- since these features do not involve SQL.

Gaston
 
Thanx for replying.
Do u have any idea to do that problem by without using SQL query.
I mean with impromptu only.
I would apprciate for ur quick response.
Thanx in Advance
 
No reason. I noticed that your last 3 responses were copied and pasted and was wondering if that was a feature of this forum.

Anyways, to re-iterate, from what I understand and what I hear from others, there is no other way to do what you want to do, unless you rebuild your query using the GUI interface. Your report doesn't sound too difficult to build, using &quot;if..then&quot; calculations, such as a calculation called &quot;Serious&quot; which can be something like this &quot;if desc_reported = <serious>, then (1), else (0).&quot; You can then total the column Serious, for a sum of all counts.

Hope that helps.
Gaston
 
Thanx for helping.
Actually I want to rebuild my query by using GUI interface.
How can i do that?.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top