Output of the query
Hi,
Good day!
when the user running the query from favourate directly
executing the query with out asking variable screen so it taking lot of time. where i need to set a options
regards
sivaraju
Hi,
Thank you very much for your reply . as your suggestion if i restrict the values in a ouput the restricted values also dispalying. but whn the user run the query through favourate it directly dispalying output without coming variable screen .
if i run the query designer varaible scree is coming . here users are working the query through favourates .do you have any alternate solution
regards
sivaraju
Similar Messages
-
Need help to format the output of the query.
First of all i would like to say I m newbi in oracle query
and of course thanks to read the thread.
I have a problem formatting a query output.
Actually the query is like the following :
select a1
,b1
,c1
from table
where id.table=1
UNION
select a2
,b2
,c2
from table2
where id.table2=1
order by 1;
exit;
my actual output
a1 b1 c1
a2 b2 c2
a1 b1 c1
a2 b2 c2
my desired output
a1 b1 c1
a2 b2 c2
a1 b1 c1
a2 b2 c2
So what i need is an empy row between the groups of results
and to shift the union query.
thanks in advanceSQL>select * from t1;
C1 C2 C3
1 2 3
2 3 4
3 4 5
SQL>select * from t2;
C1 C2 C3
30 40 50
20 30 40
10 20 30
SQL>select c1,c2,c3
2 from( select c1,c2,c3,1 flg
3 from t1
4 union all
5 select c1,c2,c3,2
6 from t2
7 union all
8 select null,null,null,1
9 from dual)
10 order by flg,c1,c2,c3 nulls last;
C1 C2 C3
1 2 3
2 3 4
3 4 5
<br>
10 20 30
20 30 40
30 40 50
7 rows selected.
Funny....... -
How to stop the information broadcasting mail if the output of the query is
Hi everyone, We have a requirement to not to send the information broadcasting mail in case if the query output is blank (ie no applicable data). However as per the schedule the mail should go in case if there is applicable data. In other words, users are not interested in opening the broadcasted mail to see if there is any applicable data or not. Inputs will be certainly rewarded
KathirHello,
Create an exception or condition for this report then use the "broadcast according to exceptions" option.
Regards,
Michael -
Text Variables are not being Displayed in the Output of the Query
Hi All ,
We have some column headings , which are populated through the Text Vaiables , But in the Query Ouptput only the tech names of the Text variables are being displayed . can anyone tell me why its happening like this . I want to debug the Query , please guide me in this regard
Thanks in Advance.. Pls reply me as soon as possibleHi Nagarjuna reddy,
Click on the properties of the infoobject enter the name of the description and next to that you can see the X/? buttion click on the this button and select the field/if the proper field is not there then create a field descriton and select. i hope this is works and correct me if i am wrong. for debuggin the query use a transaction code- RSRT.
regs,
Vachan -
Find all employees who have the same salary. Display emp1, emp2, ...and credit_limit.
Hi,
user13417896 wrote:
Find all employees who have the same salary. Display emp1, emp2, ...and credit_limit.Are emp1 and emp2 the id numbers of two employees who have the same salary? Does this mean you want to show them side-by-side on the same output row?
If so, you probably want a self-join. Imagine that the employees with lower ids were in one table, and the employees with higher id2 were in another table. You might join the two tables like this:
FROM employee_lower l
JOIN employee_higher h ON l.salary = h.salaryIn your case, both table are the same employee table, and to make sure that the id from the one you'll call l is lower than the id from the one you'll call h, you need a compound join condition, that is, two things must both be true for rows to be considered related:
(1) the salaries must be the same (as above), AND
(2) l.id must be lower that h.id
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
Post your best attempt at a query, and say specifically what the problem with that query is.
If you're getting an error message, post the complete error message, including line number.
What output do you want if 3 (or more) employees all have the same salary? -
How to display 16 weeks data in the output of the query
Hi experts,
I have to display 16 weeks data from current week(Thursday to wednesday).
(19/07/07 - 12/07/07) (11/07/07 - 6/07/07) like these 16 weeks
sales sales
product1 200 300
product2 400 500
I have to use text variable on createddate char but I do not know how to implement
the above scenerio.
Guru's please help me.
Thanks & Regards,
James.sure james ..
chk these links..
text var..
http://help.sap.com/saphelp_nw04s/helpdata/en/85/e0c73cccbdd45be10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/c1/759b3c4d4d8d15e10000000a114084/frameset.htm
chk thisthread too..
Re: Problem with the text variable
and for replacement paths..
http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
hope it helps... -
How to disable the values of the cells in the output of the query
Hi all,
I have requirement like this.
employestartdate-enddated---difference
James---02/02/0708/02/07-(XXX) -> No Display
christ---02/02/0708/02/07-(XXX) -> No Display
overallresult----
36 -> only result has to Display.
for the above scenerio I have to disable difference cell values & display the result above.
THanks,
James.James,
Select your key figure 'Diff' and right mouse click it. Select Properties. Look at the section Calculations (Includes Displayed data only). Change the Calculate Single Value to <b>Suppress Result</b>.
Regards
Gill -
Spool file problem,Can't see the query in output file.
Hello ,
I am facing a very old school kind of problem .....about spool file ....
The scenario -
I have made a script by name DB_Status_checkup.sql which i want to fire on the database to check the database status. In this script their are many queries regarding the data dictionary views to know about the database. It consist of nearly 25-30 different select queries..
The problem is i want to make a spool file of the output of that query....i want to see the SQL query & the output below in the spool file, so it will be easy for me to judge the result. But i can't see the SQL query , i can only see the output , & in so many queries it all gets jumbled up....even i can't understand where the next output starts ...
Sample of my SQL Script ....
clear buffer
spool D:\DB_status.txt
/*To check the database startup time*/
Select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time"
from v$instance
.........next query n so on....
spool off;
In the output pf the spool file at D:\db_status.txt..
Startup time
08:25 16-JUL-10It shows only the output of the query in the spool file not the query,
What should i do to get the SQL query as well as the output of that query just below it in the spool file ???
Please suggest if you have anymore ideas , regarding this .....
ORACLE 10g R2
Windows Server 2008
Thanks in advance ...Why don't you just use database control, instead of re-inventing the wheel?
Apart from that, SQL*Plus has it's own reference manual, which you apparently refuse to read.
The answer to your quiz/doc question is
set echo on
Sybrand Bakker
Senior Oracle DBA -
Displaying dynamic columns in the query output.
Hello,
Depending on current quarter output of the query would vary.
If current quarter is 'Q1'
O/p : InvQ1 Del BackQ1 BackQ2 BackQ3 BackQ4
If current quarter is 'Q2'
O/p : InvQ1 InvQ2 Del BackQ2 BackQ3 BackQ4
If current quarter is 'Q3'
O/p : InvQ1 InvQ2 InvQ3 Del BackQ3 BackQ4
If current quarter is 'Q4'
O/p : InvQ1 InvQ2 InvQ3 InvQ4 Del BackQ4
So, out of 9 columns, 6 columns would display at any given time depending on the current quarter.
Invoice of 4 quarters, Deliquency and Backlog of 4 quarters.
I am not getting any way how to display dynamic columns or hide unwanted/blank columns.
For the time being I have added all 9 columns in the query, and in the output unwanted columns shows blank.
Can anybody please suggest me how to display only 6 columns in the output depending on current quarter.
Thanks and Regards
ShilpaHello,
This shouldn't be too difficult. Assuming you have a variable with the selected quarter, you may choose to display Inv (whatever that is) for quarters 1 through variable, Del, and Back for quarters variable through 4. You also need a drilldown on quarter in the columns (after the key figure structure). You would probably need to restrict 'Del' on the variable as well if you haven't already done it.
Best regards,
Christoffer -
Error While Filtering a Particular Value in the Query Navigation
Hi ALL,
we have a time charecteristic 0FISCPER in our query and the output of the query is fine until we filter this on the variant V3 ,system is throwing an error
"System error in program SAPLRRK0 and form SORT_END_TRUE-01- (see long text)"
i have tried to fix this in "analysis and repair of infoobjects " by mentioning the name of the infocube then the system is showing the inconsistancies by the following messages
>>InfoCube XFIGL_C11 was marked as a Cube with an inconsistent time dimension.
>>Record with the DIMID 44 contains non-fitting time characteristics
>>This DIMID is used by 2475 records of the fact tables
>>No master data found for characteristic of test described subsequently
>>Time characteristic 0FISCPER value 102006000 does not fit with time char 0FISCPER3 val 0
this error is there both on the development and also the production servers. any light thrown on this issue is a awewlcome and i promise to reward points,
regardsHi,
There are a couple of threads on the same issue.
Refer to these, just might be handy.
Re: Uncaught_exception in Report Designer
Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION in Report
Good Luck!
Sandeep Tudumu -
Hi All,
I have the below requirement.
Master table:
Product ID Product Name
1 TV
2 Cellphone
3 Laptop
4 DVD Player
Details table:
Product ID Spec type Spec Detail
1 Color Blue
1 Weight 20
2 Color Blue
2 Weight 20
3 Color Blue
3 Weight 25
4 Color Blue
4 Weight 20
4 Height 10Im looking for a way to identify the products that has exact same specifications.
ie., in the above example TV and Cellphone has the exact specifications.
So the output of the query should be TV and Cellphone here.
Is it possible to do in a query or we need to have some sql block to perform this action.
Any help would be greatly appreciated.
Thanks,
AgathyaHi agathya,
We don't know how you would like to handle the situation where more than two products have the same specifications, so I extended your sample data a bit to reflect that situation as well:
SQL> create table products (id,name)
2 as
3 select 1, 'TV' from dual union all
4 select 2, 'Cellphone' from dual union all
5 select 3, 'Laptop' from dual union all
6 select 4, 'DVD Player' from dual union all
7 select 5, 'Radio' from dual union all
8 select 6, 'VCR' from dual
9 /
Tabel is aangemaakt.
SQL> create table product_specifications (product_id,spec_type,spec_detail)
2 as
3 select 1, 'Color' , 'Blue' from dual union all
4 select 1, 'Weight', '20' from dual union all
5 select 2, 'Color' , 'Blue' from dual union all
6 select 2, 'Weight', '20' from dual union all
7 select 3, 'Color' , 'Blue' from dual union all
8 select 3, 'Weight', '25' from dual union all
9 select 4, 'Color' , 'Blue' from dual union all
10 select 4, 'Weight', '20' from dual union all
11 select 4, 'Height', '10' from dual union all
12 select 5, 'Color' , 'Blue' from dual union all
13 select 5, 'Weight', '20' from dual union all
14 select 6, 'Color' , 'Blue' from dual union all
15 select 6, 'Weight', '20' from dual union all
16 select 6, 'Height', '10' from dual
17 /
Tabel is aangemaakt.
SQL> select p1.name
2 , p2.name
3 from products p1
4 , products p2
5 , product_specifications ps1
6 , product_specifications ps2
7 where p1.id = ps1.product_id
8 and p2.id = ps2.product_id
9 and p1.id < p2.id
10 group by p1.id
11 , p1.name
12 , p2.id
13 , p2.name
14 having sqrt(count(*)) =
15 count(case when ps1.spec_type = ps2.spec_type and ps1.spec_detail = ps2.spec_detail then 1 end)
16 /
NAME NAME
TV Cellphone
TV Radio
Cellphone Radio
DVD Player VCR
4 rijen zijn geselecteerd.But why on earth did you or your predecessor model product specifications like this? You are making it far more complicated than it needs to be. And the datatype of height and weight should not be the same as for color. But now they are. And how do you restrict the allowable values for colors? Color, weight and height are attributes of your products so they should have been modeled like that.
See how easy your questions becomes after remodeling it:
SQL> drop table product_specifications purge
2 /
Tabel is verwijderd.
SQL> drop table products purge
2 /
Tabel is verwijderd.
SQL> create table products (id,name,color,weight,height)
2 as
3 select 1, 'TV', 'Blue', 20, null from dual union all
4 select 2, 'Cellphone', 'Blue', 20, null from dual union all
5 select 3, 'Laptop', 'Blue', 25, null from dual union all
6 select 4, 'DVD Player', 'Blue', 20, 10 from dual union all
7 select 5, 'Radio', 'Blue', 20, null from dual union all
8 select 6, 'VCR', 'Blue', 20, 10 from dual
9 /
Tabel is aangemaakt.
SQL> select * from products
2 /
ID NAME COLO WEIGHT HEIGHT
1 TV Blue 20
2 Cellphone Blue 20
3 Laptop Blue 25
4 DVD Player Blue 20 10
5 Radio Blue 20
6 VCR Blue 20 10
6 rijen zijn geselecteerd.
SQL> select p1.name
2 , p2.name
3 from products p1
4 , products p2
5 where p1.id < p2.id
6 and ( p1.color = p2.color or (p1.color is null and p2.color is null))
7 and ( p1.weight = p2.weight or (p1.weight is null and p2.weight is null))
8 and ( p1.height = p2.height or (p1.height is null and p2.height is null))
9 /
NAME NAME
TV Cellphone
TV Radio
Cellphone Radio
DVD Player VCR
4 rijen zijn geselecteerd.Hope this helps.
Regards,
Rob. -
I want to just spool output of a query only
now when i try to use spool command, query, output and spool off command also get spooled into the specified filename.
for ex:
SQL>spool <filename>.txt
SQL>select * from dual;
SQL>spool off
but the content of output file is:
select * from dual;
DUMMY
X
spool off;
i just want output of the query, nothing else, i.e.,
DUMMY
X
plz, suggest me soln.Save this script in a text file
Call the script...
O/P will be stored in xx.txt
script
set feedback off
set echo off
spool xx.txt
select * from dual;
spool off
set echo on
set feedback on
(You can find the same answer if search in the forum) -
hi
Can You Please suggest how minimal we can correct this at the query output
My coming output for the date field at the query is
01/28/2008
04/27/2006
06/1/2006
05/16/2006
Desired Output for the query field at the query is
1/28/2008
4/27/2006
6/1/2006
5/16/2006
Zeroes should not be present can you quickly help me in this regardHi
Check conversion routine on info object maintainance .
Regards,
Chandu. -
How to display Query Description in the Query
I have a text variable which gets the % of the days Elapsed appended to the text of the query. When I execute the query I am not seeing the text in the output of the query.
Can some one say how to display text of the query in the output so that I can get the % of the days elapsed.Hi
Have u selected name and text in the key figure properties? if not the this what text u want to display
Regards
N Ganesh -
Save the o/p of the query in Application Server, Filename with Timestamp
Dear Experts,
I have a scenario that on 1st of every month, a query needs to execute and save the output of that query in Application Server, Filename along with Timestamp.
For ex: Production_19/09/2011
So, I Created a Query Extract in RSCRM_REPORT and gave the path name and scheduled. The output of the query is saved successfully in Application Server.
But I need Timestamp along with Filename.
Please help me out with the timestamp issues, how could I include Timestamp with Filename (Query Name).
Thanks,
SAP BIHi chaith,
You can achieve the result with out any code. You have to use the APD concept to extract the query to a file.
check the following link which help you to create a logical path
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e86545-9940-2d10-9f89-eb5bce1f9228?quicklink=index&overridelayout=true
you can use the path in the APD.
Regards,
Ranganath
Maybe you are looking for
-
Irc client recommendations [SOLVED]
any suggestions for an irc client (i prefer tui to gui, but am not attached). i've looked at the wikipage: http://en.wikipedia.org/wiki/Comparison - at_clients but have no experience with this mode of communication. Last edited by pradtf (2010-06-28
-
Menu for multi selection (Safari)
I brought this issue up in a previous discussion but wanted to open up a new one just for this. After updating to iOS 8, I found an issue using drop-down menus that have the option for selecting multiple items. I use a menu like this often on my job
-
Hello, How I can get sql command histyory in sqlplus. I am using Oracle 9i version 2 on Red Hat 9. Thank you in advance.
-
How do I get refund for being charged multiple times for single download
I have just been charged multiples of times for my last three purchases . How do get refunded?
-
Which axi version is the supported and compatible version for JDK1.4?
Hi, Can any body tell me Which axi version is the supported and compatible version for JDK1.4.Thanks in advance. Regards, Lokesh Kumar Pattajoshi