Multi query in one line
hi
how i can execute multi query (select) in one line without using "Enter" key by sql*plus or Toad ?
for example , i want to do as following :
"select * from request_parameter_type where param_name like 'new%' ; / select * from fund ;"
but it show me "invalid character" error on ";" and force to place "enter" between them :
select * from request_parameter_type where param_name like 'new%' ;
select * from fund ;
thx in adv.
Edited by: s_hesam_s on Oct 12, 2008 12:29 AM
You can set the cmdsep variable but it seems just the output of the last statement gets displayed:
SQL> set cmdsep |
SQL>
SQL> select ename from emp | select dummy from dual
2 /
D
X
Similar Messages
-
Multi Textbox in single line?
Hi All,
Any one know how to put multi textbox in one line ? Because normaly we only can put one object per line...
Thanks for advice guys! Cheers!!!multi textbox in one line{color:#000080}You don't know what a TextBox is.
You don't respect the fact that java is case sensitive.
You havn't a clue about device fragmentation.
You don't deserve any answer to your question.
Go through some tutorials and learn enough about j2me to ask a valid question.
db{color} -
Ad-hoc query - data on one line pr.employee
Hi,
I try to get data on one line from ad-hoc reporting. When I choose to report on several IT0105 subtypes, the subtypes are written out on one line each pr. employee. This does not look good, and is a hazal to our customer since they need to edit the report in excel. I have tried to code the switches "PERSON_ONLY_ONCE" and "LAST_DATA_ONLY" without results. Any hints/tip?
Thank you,
Kind regards
Hildehello hilde,
I think it is not possible to do it with ad-hoc.
you have to use query itself, with creating your own layout.
SQ01
regards
Stefan -
Converting a multi-line text to one-line
Hi
I have a problem with a multi-line text, to be converted to one line, which I take from a JEditorPane.
I tried several things but it is still multi line
// the text is taken from JEditorPane
String str = jeditorPane.getText();
// replace "\n" with " "
str.replaceAll("\\n", " ");or
// the text is taken from JEditorPane
String str = jeditorPane.getText();
Scanner s = new Scanner(str);
String line;
String completeText="";
while( ( line = str.nextLine() ) != null ){
completeText += line + " ";
}In the fist code, it replaces all the "\n"'s with a space but it is still multi-line
in the second one, it doesn't change anything
So, what is wrong with these codes?
p.s. In the second code there (may) be a little mistake causing compile time error, please ignore that, my problem is with the logic of the code
thanksHow do you know that the string is still multi-line after you have executed replaceAll? Have you tried to also remove all \r in the text?
Kaj -
How to put grouped results all on one line.
I amt trying to get Principal, Interest, Principal YTD, Interest YTD from a transaction table to get them all on one line, but I can't seem to get it. I have a script here that can run without modification to see what I have here. The very last query is
incorrect, as it puts each value on a separate line, but it demonstrates what I am getting so far. What I want is one account number with 4 columns, as above mentioned. Keep in mind, in this illustration, YTD is last year and forward:
CREATE TABLE #a
PMT_ID INT IDENTITY(1,1),ACCT_NO INT, PMT_TYPE CHAR(1), PMT_AMT MONEY, PMT_DATE DATE)
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 351, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2012-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 850, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 200, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 880, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 855, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 203, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 101, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 354, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 851, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 199, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 881, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 854, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 205, '2013-12-01')
SELECT PMT_ID, ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE
FROM #a
SELECT ACCT_NO, SUM(PMT_AMT) TOT_PRINCIPAL_PAID
FROM #a
WHERE PMT_TYPE = 'P'
GROUP BY ACCT_NO
SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID
FROM #a
WHERE PMT_TYPE = 'I'
GROUP BY ACCT_NO
SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_PRINCIPAL_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'P'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO
SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'I'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO
SELECT ACCT_NO
,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID
,NULL AS TOTAL_INTEREST_PAID
,NULL AS TOTAL_PRINCIPAL_PAID_YTD
,NULL AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'P'
GROUP BY ACCT_NO
UNION
SELECT ACCT_NO
,NULL AS TOTAL_PRINCIPAL_PAID
,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID
,NULL AS TOTAL_PRINCIPAL_PAID_YTD
,NULL AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'I'
GROUP BY ACCT_NO
UNION
SELECT ACCT_NO
,NULL AS TOTAL_PRINCIPAL_PAID
,NULL AS TOTAL_INTEREST_PAID
,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID_YTD
,NULL AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'P'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO
UNION
SELECT ACCT_NO
,NULL AS TOTAL_PRINCIPAL_PAID
,NULL AS TOTAL_INTEREST_PAID
,NULL AS TOTAL_PRINCIPAL_PAID_YTD
,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'I'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO
-- Query to put this all these 4 columns on the same line, ending up with 3 lines.
DROP TABLE #aTry the below query
CREATE TABLE #a
PMT_ID INT IDENTITY(1,1),ACCT_NO INT, PMT_TYPE CHAR(1), PMT_AMT MONEY, PMT_DATE DATE)
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 351, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2012-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 850, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 200, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 880, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 855, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 203, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 101, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 354, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 851, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 199, '2013-09-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 881, '2013-10-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 854, '2013-12-01')
INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 205, '2013-12-01')
SELECT PMT_ID, ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE
FROM #a
SELECT ACCT_NO, SUM(PMT_AMT) TOT_PRINCIPAL_PAID
FROM #a
WHERE PMT_TYPE = 'P'
GROUP BY ACCT_NO
SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID
FROM #a
WHERE PMT_TYPE = 'I'
GROUP BY ACCT_NO
SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_PRINCIPAL_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'P'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO
SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'I'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO
select
T123.ANO,
SUM(TOTAL_PRINCIPAL_PAID) TOTAL_PRINCIPAL_PAID,
SUM(TOTAL_INTEREST_PAID) TOTAL_INTEREST_PAID ,
SUM(TOTAL_PRINCIPAL_PAID_YTD) TOTAL_PRINCIPAL_PAID_YTD,
SUM(TOTAL_INTEREST_PAID_YTD) TOTAL_INTEREST_PAID_YTD
from
SELECT ACCT_NO ANO
,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID
,NULL AS TOTAL_INTEREST_PAID
,NULL AS TOTAL_PRINCIPAL_PAID_YTD
,NULL AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'P'
GROUP BY ACCT_NO
UNION
SELECT ACCT_NO
,NULL AS TOTAL_PRINCIPAL_PAID
,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID
,NULL AS TOTAL_PRINCIPAL_PAID_YTD
,NULL AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'I'
GROUP BY ACCT_NO
UNION
SELECT ACCT_NO
,NULL AS TOTAL_PRINCIPAL_PAID
,NULL AS TOTAL_INTEREST_PAID
,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID_YTD
,NULL AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'P'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO
UNION
SELECT ACCT_NO
,NULL AS TOTAL_PRINCIPAL_PAID
,NULL AS TOTAL_INTEREST_PAID
,NULL AS TOTAL_PRINCIPAL_PAID_YTD
,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID_YTD
FROM #a
WHERE PMT_TYPE = 'I'
AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
GROUP BY ACCT_NO)T123
Group by T123.ANO
DROP TABLE #a -
Show different distribution channels in one line
Hello everybody,
I have the following reporting problem: My customer wants to see an an attribute to 0Mat_sales summarized in one line despite the different distribution channels. With other words there is one material where two different distribution channels have the same value in this attribute. Any chance to show this in one line summarized in the query?
Thx in advance,
Karsten.This is not a support forum for the psexec utility.
Try posting here:
http://forum.sysinternals.com/pstools_forum8.html
-- Bill Stewart [Bill_Stewart] -
How to Print Multiple Barcode in one line
Hi All,
I am printing barcode using <c1>&lwa_itab-matnr</>. now i have a query i want to print in the same line one more bar code with the values. but i m not able to print it. will any one pls help me out in this how i will print more than one barcode in one line.
i have tried this syntax also
<c1>&lwa_itab-matnr& &lwa_itab-matnr&</>.
But it is not giving gap between two barcode. it is considering space and converting space also in barcode which i don't want. I want to print two barcodes separately with some space. How will i do this.
Pls answer it. it is very urgent.
I am doing this in smartforms.
Thanks
Garima
Edited by: Garima Mittal on Jun 18, 2008 12:34 PMhi,
try like this.
<c1>field1_</c1>_ <c1>field2_</c1>_
give the two fields in the same line.
so this will help u in printing the barcodes in the same line
please reward me if helpful.
regards,
Reddy. -
More than one VAT code on one line item?
Hello,
Running ECS SRM 5.0.
Is it absolutely impossible to set more than one VAT code on one order line in a SC or PO?
Can this be acomplished by using a user exit or anything?
This demand comes from a public sector company which pays different VAT dependent on what they use as account assignment. In some orders when split account assignment is used, it might be two different VAT codes on the same line.
rgds
GARHi
Which SRM version are you using ?
As far as i know, this is standard SRM functionality as it not feasible to have multiple VAT codes against one line item.. This is not possible .. Please confirm the same with SAP by creating a Customer OSS message.. Do let me know...
However this is possible by making the code as per your business requirments using BBP_DOC_CHANGE_BADI.. However, since i have not tried this.. You need to try this yourself..
Hope this will answer your query..
Regards
- Atul -
How can I make a form where text flows from one line to another?
I have created a fillable multi page form in Adobe Acrobat Pro XI. The form was originally created in InDesign, using lines for text. I saved as an interactive pdf, opened in Acrobat Pro, and created a form using the "Create Form" function. This worked great, but some parts of the form have multiple lines that need to be filled out, so the customer would continue typing and the type would flow from one line to the next. Right now the lines are individual fields. Can I easily convert these fields so that the text goes from one line to the next as the person filling out the form types?
Thank you for the help.The easiest way is to do a slight redesign to get rid of the lines and then use a multiline field instead of multiple single line fields. If you really need to have the lines, you can use an approach that's demonstrated in the following sample: https://workspaces.acrobat.com/?d=AG6oZ3bi3DYHokxDPeWN7A
You may come across attempts to use JavaScript to automatically move to the next field when the previous one is filled-up, but I've never seen this work very well. -
Using WQL "one-liner" to extract a value from the registry
Can I extract a value from the registry using a "one-liner" WQL command? Something like the following:
Under root\default:StdRegProv
SELECT <Data> FROM "HKLM:SOFTWARE\Toto\Version"
Please note that I am aware of how this is done via script. The problem is that I'm using a management system (SCOM), which only allows me to supply a simple WQL query to perform my evaluation.
Thanks,
LarryHi Larry,
There have a specific forum to support the scripting related question, i sugges you ask in Scripting forum there will have more
professional engineer will help you.
The Official Scripting Guys Forum!
https://social.technet.microsoft.com/Forums/en-US/9d5a7990-b975-488a-b7c0-6d866f29cf0a/change-mouse-scheme?forum=ITCG
Best Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
I have my SSRS report to show the top 3 volumes by physician. My problem is it shows them in three lines going down, even though the code is in one cell. Such as:
Dr Smith
Dr Johnson
Dr James
I need it to show as Dr Smith, Dr Johnson, Dr James (all on one line separated by commas). Here is what I have tried:
=Switch(RunningValue(Fields!Attending_Pract_Name.Value,CountDistinct,Nothing)=1,
Fields!Attending_Pract_Name.Value) & ", " &
Switch(RunningValue(Fields!Attending_Pract_Name.Value,CountDistinct,Nothing)=2,
Fields!Attending_Pract_Name.Value) & ", " &
Switch(RunningValue(Fields!Attending_Pract_Name.Value,CountDistinct,Nothing)=3,
Fields!Attending_Pract_Name.Value)
But it still puts the list going down instead of side by side. Any ideas?Hi cpemtp1,
Based on my understanding, there is a column with a lot of rows. Now, you want to combine data of top three rows into one line, right?
In Reporting Services, when generating each detail row, it only pass one value of data field into expression. So we can never simply using expression to combine three values within one data field together. Regarding your expression, for each row, if this
value meets requirement, the expression returns this value, otherwise it returns null value. In your scenario, if you only want to display those top three values in your tablix, I would recommend you create another dataset and combine data of top three rows
to one line on query level. Please refer to screenshots below:
Reference:
Use PATH Mode with FOR XML
How to combine values from multiple rows of a single column (T-SQL, Microsoft SQL Server, FOR XML PATH, CSV ).
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu -
Multi query reports and BI Publisher?
I have to create a report that gathers data from DB using several SQL queries - text mixed with data tables. I was not able to find anything like that in Apex 3.0 or BI Publisher. Am I missing something?
As a solution I was trying to pass more complex, hierarchical XML data structure to BI Publisher with several repeating groups that would serve my purpose. Apex seems to generate only one level XML.
Is there a way to generate XML file manually and pass it to BI Publisher?
Thank You
JanisDoes anyone have an idea on how to create multi-query report?
..or maybe how to manually create XML and pass it to BI Publisher?
Tahnk you!
Janis -
Hi, people.
I have the situacion of result set of a query
cod val time1 time2 time3
1 a 18:30 null null
1 a null 20:30 null
1 a null null 21:40
2 b 10:27 null null
understand 'null' like empty spaces ou null
How do I do to show record 1 i one line , i need this way
1 a 18:30 20:30 21:40
2 b 10:27
thanks....
Edited by: claudioaragao on 07/05/2012 09:36
Edited by: claudioaragao on 07/05/2012 09:38ok...this is the query
SELECT PEDV_ID_PLANTA
, DT_REGISTRO
, NFCA_ID_PED
, PEDV_ID_PREVOL
, PEDV_ID_ONDA
, NFCA_ID_NOTA
, NFCA_SERIE
, NFCA_VL_TOTAL_NOTA
, NFCA_QT_VOLUMES
, EMISSAO
, INICIO
, ACEITA
, NFCA_USUARIO
, USUA_NOME
FROM (
SELECT ROWNUM CUR,
PEDV_ID_PLANTA,
TO_CHAR(PEDV_DT_REGISTRO,'DD/MM/RRRR') DT_REGISTRO,
NFCA_ID_PED,
PEDV_ID_PREVOL,
PEDV_ID_ONDA,
NFCA_ID_NOTA,
NFCA_SERIE,
NFCA_VL_TOTAL_NOTA,
NFCA_QT_VOLUMES,
'E' STATUS,
DECODE(STATUS,NULL,NULL,'E',TO_CHAR(SWTK_DT_REGISTRO,'HH24:MI:SS')) EMISSAO,
DECODE(STATUS,NULL,NULL,'I',TO_CHAR(SWTK_DT_REGISTRO,'HH24:MI:SS')) INICIO,
DECODE(STATUS,NULL,NULL,'A',TO_CHAR(SWTK_DT_REGISTRO,'HH24:MI:SS')) ACEITA,
NFCA_USUARIO,
USUA_NOME
FROM
SELECT PC.PEDV_ID_PLANTA,
PC.PEDV_DT_REGISTRO,
NC.NFCA_ID_PED,
PC.PEDV_ID_PREVOL,
PC.PEDV_ID_ONDA,
NC.NFCA_ID_NOTA,
NC.NFCA_SERIE,
NC.NFCA_VL_TOTAL_NOTA,
NC.NFCA_QT_VOLUMES,
EMIS_NOTA.SWTK_DT_REGISTRO,
'E' STATUS,
NC.NFCA_USUARIO,
US.USUA_NOME
FROM PLANTA PL,
PEDIDO_CAB PC,
FILIAL FI,
NOTA_FISCAL_CABECALHO NC,
USUARIOS US,
SW_TRACKING EMIS_NOTA
WHERE PL.PLTA_ID_PLANTA = 'PFRIO'
AND NC.NFCA_DT_EMISSAO >= DECODE('11/01/2012','NULL',NC.NFCA_DT_EMISSAO,TO_DATE('11/01/2012','DD/MM/RRRR'))
AND NC.NFCA_DT_EMISSAO <= DECODE('11/01/2012','NULL',NC.NFCA_DT_EMISSAO,TO_DATE('11/01/2012','DD/MM/RRRR'))
AND NC.NFCA_HR_EMISSAO >= DECODE('NULL','NULL',NC.NFCA_HR_EMISSAO,'NULL')
AND NC.NFCA_HR_EMISSAO <= DECODE('NULL','NULL',NC.NFCA_HR_EMISSAO,'NULL')
AND NC.NFCA_SERIE LIKE '1'
AND PC.PEDV_ID_PLANTA = PL.PLTA_ID_PLANTA
AND PC.PEDV_SITUACAO != 'C'
AND FI.FILI_CGC = PL.PLTA_ID_TERCEIRO
AND NC.NFCA_ID_CIA = FI.FILI_ID_CIA
AND NC.NFCA_ID_FILIAL = FI.FILI_ID_FILIAL
AND NC.NFCA_ID_PED = TO_NUMBER(PC.PEDV_NUM_PED_TERC)
AND NC.NFCA_SITUACAO = 'A'
AND US.USUA_ID_USUARIO = NC.NFCA_USUARIO
AND EMIS_NOTA.SWTK_ID_TRACKING = (SELECT MAX(SWTK_ID_TRACKING)
FROM SW_TRACKING
WHERE SWTK_ID_PED = PC.PEDV_ID_PED
AND SWTK_ID_EVENTO = 9)
UNION
SELECT PC.PEDV_ID_PLANTA,
PC.PEDV_DT_REGISTRO,
NC.NFCA_ID_PED,
PC.PEDV_ID_PREVOL,
PC.PEDV_ID_ONDA,
NC.NFCA_ID_NOTA,
NC.NFCA_SERIE,
NC.NFCA_VL_TOTAL_NOTA,
NC.NFCA_QT_VOLUMES,
INIC_CONF.SWTK_DT_REGISTRO,
'I' STATUS,
NC.NFCA_USUARIO,
US.USUA_NOME
FROM PLANTA PL,
PEDIDO_CAB PC,
FILIAL FI,
NOTA_FISCAL_CABECALHO NC,
USUARIOS US,
SW_TRACKING INIC_CONF
WHERE PL.PLTA_ID_PLANTA = 'PFRIO'
AND NC.NFCA_DT_EMISSAO >= DECODE('11/01/2012','NULL',NC.NFCA_DT_EMISSAO,TO_DATE('11/01/2012','DD/MM/RRRR'))
AND NC.NFCA_DT_EMISSAO <= DECODE('11/01/2012','NULL',NC.NFCA_DT_EMISSAO,TO_DATE('11/01/2012','DD/MM/RRRR'))
AND NC.NFCA_HR_EMISSAO >= DECODE('NULL','NULL',NC.NFCA_HR_EMISSAO,'NULL')
AND NC.NFCA_HR_EMISSAO <= DECODE('NULL','NULL',NC.NFCA_HR_EMISSAO,'NULL')
AND NC.NFCA_SERIE = '1'
AND PC.PEDV_ID_PLANTA = PL.PLTA_ID_PLANTA
AND PC.PEDV_SITUACAO != 'C'
AND FI.FILI_CGC = PL.PLTA_ID_TERCEIRO
AND NC.NFCA_ID_CIA = FI.FILI_ID_CIA
AND NC.NFCA_ID_FILIAL = FI.FILI_ID_FILIAL
AND NC.NFCA_ID_PED = TO_NUMBER(PC.PEDV_NUM_PED_TERC)
AND NC.NFCA_SITUACAO = 'A'
AND US.USUA_ID_USUARIO = NC.NFCA_USUARIO
AND INIC_CONF.SWTK_ID_TRACKING = (SELECT MAX(SWTK_ID_TRACKING)
FROM SW_TRACKING
WHERE SWTK_ID_PED = PC.PEDV_ID_PED
AND SWTK_ID_EVENTO = 15)
UNION
SELECT PC.PEDV_ID_PLANTA,
PC.PEDV_DT_REGISTRO,
NC.NFCA_ID_PED,
PC.PEDV_ID_PREVOL,
PC.PEDV_ID_ONDA,
NC.NFCA_ID_NOTA,
NC.NFCA_SERIE,
NC.NFCA_VL_TOTAL_NOTA,
NC.NFCA_QT_VOLUMES,
NOTA_ACEITA.SWTK_DT_REGISTRO,
'A' STATUS,
NC.NFCA_USUARIO,
US.USUA_NOME
FROM PLANTA PL,
PEDIDO_CAB PC,
FILIAL FI,
NOTA_FISCAL_CABECALHO NC,
USUARIOS US,
SW_TRACKING NOTA_ACEITA
WHERE PL.PLTA_ID_PLANTA = 'PFRIO'
AND NC.NFCA_DT_EMISSAO >= DECODE('11/01/2012','NULL',NC.NFCA_DT_EMISSAO,TO_DATE('11/01/2012','DD/MM/RRRR'))
AND NC.NFCA_DT_EMISSAO <= DECODE('11/01/2012','NULL',NC.NFCA_DT_EMISSAO,TO_DATE('11/01/2012','DD/MM/RRRR'))
AND NC.NFCA_HR_EMISSAO >= DECODE('NULL','NULL',NC.NFCA_HR_EMISSAO,'NULL')
AND NC.NFCA_HR_EMISSAO <= DECODE('NULL','NULL',NC.NFCA_HR_EMISSAO,'NULL')
AND NC.NFCA_SERIE = '1'
AND PC.PEDV_ID_PLANTA = PL.PLTA_ID_PLANTA
AND PC.PEDV_SITUACAO != 'C'
AND FI.FILI_CGC = PL.PLTA_ID_TERCEIRO
AND NC.NFCA_ID_CIA = FI.FILI_ID_CIA
AND NC.NFCA_ID_FILIAL = FI.FILI_ID_FILIAL
AND NC.NFCA_ID_PED = TO_NUMBER(PC.PEDV_NUM_PED_TERC)
AND NC.NFCA_SITUACAO = 'A'
AND US.USUA_ID_USUARIO = NC.NFCA_USUARIO
AND NOTA_ACEITA.SWTK_ID_TRACKING = (SELECT MAX(SWTK_ID_TRACKING)
FROM SW_TRACKING
WHERE SWTK_ID_PED = PC.PEDV_ID_PED
AND SWTK_ID_EVENTO = 35)
ORDER BY PEDV_ID_PLANTA,PEDV_DT_REGISTRO
and this is the result set
1 PFRIO 11/01/2012 406901 2320 769 949 1 114,10 1,000000000 PFRIOS Sige 7/5/2012 7/5/2012 10/10/2008
2 PFRIO 11/01/2012 406901 2320 769 949 1 114,10 1,000000000 PFRIOS Sige 7/5/2012 10/11/2048 7/5/2012
3 PFRIO 11/01/2012 406901 2320 769 949 1 114,10 1,000000000 PFRIOS Sige 10/9/2003 7/5/2012 7/5/2012 -
Hi all,
I have a table T of the kind:
N
a
a
a
b
b
b
c
c
I want the result as:
a b c
3 3 2
For that i have writtena query
select decode(n,'a',count)a,decode(n,'b',count)b,decode(n,'c',count)c
from(select n,count(*)count from t group by n);
But it is giving the output as:
a b c
3
3
2 How can i get the output in one line?
ThanksDimaCit has given a good solution for when you know how many different values you have in advance. If you do not know this, you can code for a number that is higher than you expect or use generated sql to product the desired output. Also I allow for values that are not valid column names.
SQL> host type tmp.sql
set feedback off
set termout off
create table t (N varchar2(4));
insert into t values ('A');
insert into t values ('A');
insert into t values ('A');
insert into t values ('B');
insert into t values ('b');
insert into t values ('b');
insert into t values ('c');
insert into t values ('c');
insert into t values ('c');
insert into t values ('c');
insert into t values ('c');
insert into t values ('6');
insert into t values ('6');
insert into t values ('6');
set pagesize 0
set linesize 32767
set trimspool on
column nl newline
spool tmp.ufi
prompt select
select
' count(decode(n,'''||n||
''',1, null)) "'||n||
decode(rv,1,'"','",') nl
from
(select
n,
row_number() over (order by n) rn,
row_number() over (order by n desc) rv,
sum(1) over() tot from (select distinct n from t)
order by rn
prompt from t;;
spool off
set pagesize 50000
set termout on
@tmp.ufi
drop table t;
SQL> @tmp
6 A B b c
3 3 1 2 5
SQL> Edited by: Old DBA on Feb 5, 2009 8:32 PM
Formatting -
Hi,
I have this query :
SQL> SELECT 'SOMETHING',ID_NUMBER FROM TABLE;
It returns :
SOMETHING
5.01.10.001
How can I do to have all in one line, like following :
SOMETHING 5.01.10.001
Many thanks.Hi,
Have a look...
SQL> create table testtab (id_number varchar2(20));
Tabelle wurde angelegt.
SQL> insert into testtab values('5.01.10.001');
1 Zeile wurde erstellt.
SQL> SELECT 'SOMETHING',ID_NUMBER FROM testtab;
'SOMETHIN ID_NUMBER
SOMETHING 5.01.10.001
SQL> Maybe it's a matter of linesize (sometimes size matters ;))?
Rgds,
Guido
Maybe you are looking for
-
Error while deploying, Custom Style Skin in OBIEE 11.1.1.6.7
Hi, I have deployed Custom Style Skin in OBIEE 11.1.1.5 successfuly (with the help of http://www.rittmanmead.com/2010/12/oracle-bi-ee-11g-styles-skins-custom-xml-messages/ ). Now when we're moving RPD, Catalog & Custom Style Skin from OBIEE 11.1.1.5
-
Print Sizing and Quality Issues
When I print PDF documents I have issues with sizing and quality. I only have this issue with my Mac. Windows prints the files as they should be. I've tried two different printers, both over network. It doesn't matter whether I am in Adobe or in a br
-
How do I change what the desktop background is for new desktops?
I am on OS X Mavericks and I want to change my desktop background so that every new desktop I create has that background, but whenever I change the background, it only changes the background for the desktop I was currently in and all new desktops I c
-
Hide text label in IR report section conditionally
Hi, We have a textlabel and a computed field in a report section in IR 11.1.2.1. Is there a way(through scripting) to hide the textlabel and field based on certain conditions, like say, if the field computes to 'zero'? Thanks.
-
Whats the alternative to sqlldr because I want to add (update) not insert..
mornin gurus.. As title asks, Ive just sussed that SQLLDR just inserts into an empty table, but I need to update AND Insert.. I'll be running the code/command from a UNIX script. But just to get me started - how do I do this..? I'll be calling a file