Layout: multiple rows of different lengths
Ok for one im kinda new to java so all this swing stuff is still in a limited understanding for me. I am doing quite well with it, but i am trying to have a set of buttons, 50 in fact. There are like 10 rows. Now the problem is that the first 3 rows are different lengths such as:
x is a button
x x x x x
x x x x x x x
x x x x
x x x x x x x x x
x x x x x x x x x
x x x x x x x x x
x x x x x x x x x
x x x x x x x x x
x x x x x x x x x
sorry about the horrible illustration, what im trying to say is that the first row has lets say 5 buttons, then the second row has 6 then the 3rd has 4 and then the remaining ones have 5. How would i come about this. I have tried using multiple jpanels like in the code below, but only the last one is being displayed, how would i do this?
If you need more info post that you need it.
Thanks
CODE:
JPanel pane1 = new JPanel(new GridLayout(0, 1));
pane1.setBorder(BorderFactory.createEmptyBorder(30, 30, 10, 30));
JPanel pane2 = new JPanel(new GridLayout(0, 5));
pane2.setBorder(BorderFactory.createEmptyBorder(30, 30, 10, 30));
JPanel pane3 = new JPanel(new GridLayout(0, 6));
pane3.setBorder(BorderFactory.createEmptyBorder(30, 30, 10, 30));
JPanel pane4 = new JPanel(new GridLayout(0, 4));
pane4.setBorder(BorderFactory.createEmptyBorder(30, 30, 10, 30));
JPanel pane5 = new JPanel(new GridLayout(0, 5));
pane5.setBorder(BorderFactory.createEmptyBorder(30, 30, 10, 30));
JTextArea displayBox = new JTextArea("Hello");
pane1.add(displayBox);
JButton[] buttons = new JButton[50];
for (int x=0; x < 50; x++)
buttons[x] = new JButton(normKeys[x]);
if (x <= 4)
pane2.add(buttons[x]);
else if (x <= 10)
pane3.add(buttons[x]);
else if (x <= 14)
pane4.add(buttons[x]);
else
pane5.add(buttons[x]);
frame.getContentPane().add(pane1, BorderLayout.CENTER);
frame.getContentPane().add(pane2, BorderLayout.CENTER);
frame.getContentPane().add(pane3, BorderLayout.CENTER);
frame.getContentPane().add(pane4, BorderLayout.CENTER);
frame.getContentPane().add(pane5, BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size. Each GridBagLayout object maintains a dynamic, rectangular grid of cells, with each component occupying one or more cells, called its display area.
Similar Messages
-
Update multiple row for different values
hi,
Please provide me the sql query to update multiple row in a table with different values.
i need to change the old date to new date
we have only 3 column id,name,old date.now i need to update the old date to new date
ID name old date new date
1 A 2012-12-20 12/7/2012
2 B 2012-12-20 12/9/2012
3 c 2012-12-20 12/5/2012
thank you.Here are two ways to do this. Thanks to ranit for the table creation script, which I adapted.create table test_x
as
select 1 id, 'A' name, to_date('2012-12-20','yyyy-mm-dd') old_date
from dual UNION ALL
select 2 id, 'B' name, to_date('2012-12-20','yyyy-mm-dd') old_date
from dual UNION ALL
SELECT 3 ID, 'C' NAME, TO_DATE('2012-12-20','yyyy-mm-dd') OLD_DATE
from dual;First method using MERGE:MERGE INTO TEST_X O
USING (
select 1 id, to_date('12/7/2012','mm/dd/yyyy') new_date
from dual UNION ALL
select 2 id, to_date('12/9/2012','mm/dd/yyyy') new_date
from dual UNION ALL
SELECT 3 ID, TO_DATE('12/5/2012','mm/dd/yyyy') NEW_DATE
FROM DUAL
) n
ON (O.ID = N.ID)
WHEN MATCHED THEN UPDATE SET OLD_DATE = n.NEW_DATE;Second method using UPDATE:UPDATE TEST_X SET OLD_DATE =
CASE WHEN ID = 1 THEN TO_DATE('12/7/2012','mm/dd/yyyy')
WHEN ID = 2 THEN TO_DATE('12/9/2012','mm/dd/yyyy')
WHEN ID = 3 THEN TO_DATE('12/5/2012','mm/dd/yyyy')
END
where id between 1 and 3;
You probably don't want to use these methods.*
You say the "user" will enter these values. Will he always enter exactly 3 values?
The "user" will enter values into a screen I suppose. What language is the user interface programmed in? -
Copying multiple rows of different formatting
My table is a Cue Sheet for a theater production. I have 3 rows of various information that together describe everything for just 1 Cue. So these 3 rows of differently formatted information is all for just one "Cue row". So in essence, these 3 rows are sort of acting as 1 large row.
I need these three rows for each new cue that I add into the spreadsheet, so I will be copying these 3 rows, or 1 "cue row", over and over again for each new Cue I add. But the problem I'm having is that when I go to copy and paste the previous 3 rows (or the last "Cue Row") to create a new Cue, not all of the formatting copies. It looks like only 1 row's formatting copies.
So, is there any way to treat multiple rows as if they were just 1 row? Or in other words, how can you copy & paste multiple rows of various formatting?
I'd like this because I need the ability to add new "Cue rows" quickly without having to reformat every time I copy or duplicate. Any help or suggestions you have would be great. Thanks!Jerrold Green1 wrote:
Please let us know what works for you after you give it a try. Your original question said nothing about borders. Borders will Copy, but they will only Paste as a new table, not as an insertion or addition, at least not in my experience.
My experience is different.
Assuming that cell B2 has a full 4 edges border whose thickness is 3 points and color red
that cell C2 has only the top border set to 3 points, color Blue.
If I select both, apply Copy Style then Paste Style in cell D4, I get the full borders in D4 and nothing in E4.
If I select only cell C2, Copy Style, Paste Style in G4, I get a full red border in G4
If I define cell B5 with a top border of 4 points Blue, when I apply Copy Style then Paste Style to G6, I get a full blue border in G6.
There is at least some inconsistencies between the behavior and what is written in the User Guide.
In this useful resource, we may read :
select the table or cells whose effects you want to reuse, choose Format > Copy Style,
select the table or cells you want to format, and then choose Format > Paste Style.
This is true, only if the cells from which we copied style (no s here) wore the same style.
It's not absurd as the items aren't named Copy Style(s), Paste Style(s)
but Copy Style, Paste Style.
What is written means that we may select several cells with the same effects (yes, one cell may wear several effects). Copy Style will copy these effects so that Paste Style will apply them to every selected target cells.
Its not clear for all of us and, as I described before, the result may be different than the described one.
So, my own way of use is to select a single cell, Copy its Style,
select the target range then apply Paste Style.
And even with this scheme, the result may be 'surprising'.
A funny example before sending this message.
To achieve that, I defined the cell E4 with a full 2 points blue border.
Then I copied its style and paste it to the range E4…E33
At first I tried to define only the top border assuming that I will get full borders as I get when pasting style to a single cell but, nada, I got nothing.
Then I defined a single red top border to H6 but Pasting its style to range D4…D33 didn't give red borders but remove the vertical left border of cells E4…E33.
So I defined a full red border to H6 and Pasted this Style to D4…D33 and to F4…F33
I tried to define green top and bottom borders to H10 and Paste this Style to the range E4…E33.
Of course, I didn't got green horizontal borders.
The four edges of these cells were cleared and reset to the original thin grey ones.
Bizarre, vous avez dit bizarre
Have fun with borders
Yvan KOENIG (VALLAURIS, France) lundi 7 mars 2011 16:17:59 -
Updating multiple rows with different values
Hi!
I have a problem. I need to update more then 1000 rows with different values. How can I do it?
For exsample i have table:
id; color, date,
1 red
2 green
3 white
I need to update date field.
Update table
set date='01.02.03'
where id=1
Update table
set date='01.03.03'
where id=2
Maybe there is way how to update multiple rows at one query?
Sorry for my bad english.
Thanks!Hi,
You can try this
UPDATE TABLE SET DATE = CASE
WHEN ID = 1 THEN TO_DATE('01-02-03','DD-MM-RR')
WHEN ID = 2 THEN TO_DATE('01-03-03','DD-MM-RR')
ENDcheers
VT -
SELECTing from multiple rows and different tables
Basically, I have a table with a primary key and some other columns of data. The second table has a foreign key that points to the first table then has a columns with related data. I want to write construct a SQL query where one of the columns is the primary key from the first table and the second column is a concatenation of all the rows in the second table that have the same foreign key.
I need this in the form of one SQL statement so that I can use it to create a report in Application ExpressJust in case my first post was a bit unclear.
My first table has a primary key, INTERACTION_ID, and several other columns of data.
My second table has a foreign key, INTERACTION_ID, and one extra column, USER_NAME.
There are several rows in the second table that share the same INTERACTION_ID as each interaction can have many user names. I want to construct a SQL query where I pull the interaction id in one column and concatenate all the relevant rows of USER_NAME as the second column. -
FETCH multiple rows into different variables
Dear all,
i would like to have a loop to fetch 2 rows into 2 separate variables at a time. Does anybody have a clue how could I do this?
ThanxYou can't do it with a FOR record IN cursor LOOP. You'll have to do it the old-fashioned way, something like this:
DECLARE
CURSOR c1 IS SELECT blah....
r1 C1%ROWTYPE;
r2 C1%ROWTYPE;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO r1;
IF C1%NOTFOUND THEN
EXIT;
END IF;
FETCH c1 INTO r2;
IF C1%NOTFOUND THEN
EXIT;
END IF;
do_some_stuff;
END LOOP;
CLOSE c1;
END;
/Cheers, APC -
Hi everyone, : )
I am creating a website using FGL in DW CS6, v12.0 build 5808. I do not have Creative Cloud (do you have to pay to use this service?).
I have created one layout for my home page.
I would like to create several more pages, but I want them to use different layouts (as well as different content).
I tried to do something similar before using 'save as' (this was with a non-FGL), but whenever I changed the original page that I had 'save as'd' from, the layout in all the other pages would change too!
I found a possibility from someone else online suggesting using a template, but have not tried it yet: http://www.linkedin.com/groups/Adding-second-fluid-page-in-119937.S.192422240
I'm a bit scared of breaking everything, as I am new to web design and have had to restart the whole process a few times due to messing up the fluid.css etc and other issues, so I am taking baby steps.
Happy to try whatever's suggested and, while I wait for (I hope) your responses, I think I will try the template thing, but from the reply the person who asked the question gave, it sounds like his subsequent pages changed too, as I mentioned above? *scared* ; )
If anyone can help me with this query I would be very grateful. Thank you! : )Thanks David.
I tried using different IDs for the other pages, but eventually one of the divs seems to 'break' - it overlaps other divs, or cannot be moved or resized (you can select the outline and it goes blue, but no 'move up a row' or down a row or 'lock to grid' etc icons appear and it can't be drag-re-sized), plus the green overlay disappears (just from that div. I'm aware of how to turn visual aids on and off), so it seems broken. This often seems to happen if you rename a div once it's been created; it does not rename in the layout.css on the right side panel (CSS Styles) in DW and the 'broken' behaviour above is exhibited. Do you know anything about this? Is this the 'edit this doc at your peril' stuff that most tutorials seem to mention? Am I doing something wrong?
I also tried making an FGL and saving out the original boilerplate.css, layout.css and respond.js. Then created multiple new FGLs and each time it created new versions of layout.css (called 'untitled-1', 2 etc.). Once I had created all the FGLs, I deleted all the new boilerplates and untitled.css files. Then restored the original ones and changed the link at the top of each page's html to refer to the same filename (the original layout.css), rather than untitled.css. I thought this might work and it seemed to for a while, but then as I had to add new div names for the sections on each page, it eventually broke (as above).
Anyway, I think you have a good point about different layouts and it occurred to me also while I was exploring and waiting for replies here. I think I will make one layout for all pages and go with that. I have a couple of questions about that though:
1. I think the max number of divs I want for one of the pages is 10, but some pages need less divs. If I only fill e.g. 8 divs on one page, will the other ones be sat there empty? I think they will actually...I guess I'm asking because I have not tried it yet (will do after this) and it takes so long to do this trial and error.
2. If the amount of content in each div is different, e.g. let's say Page 1 has 6 lines of content in div1, but page 2 may have an unlimited amount of content (I will want to add to it in the future). Will this result in the div on page 1 being a huge block of empty space after its 6 lines?
Thanks so much for your help! -
Displaying multiple rows in a form layout problem?
HI,
I displayed multiple rows using form layout,but form browse buttons displaying one row multiple times like if i click next it is displaying same rows in next page also ?
how can I prevent this?
very urgent
Thanks in advanceSet the table range size property to the number of rows you want to display.
Then as a post-generation action, drag and drop the Next Set and Previous Set operations of your View Object usage as buttons onto your page.
Then move the button code to a custom template, and uncheck group-level checkbox "Clear Page Definition before generation" to preserve the NextSet and PreviousSet action bindings.
Steven Davelaar,
JHeadstart Team. -
how to define a schema for fixed length consisting of multiple records of different types having header detail and footer at positions 22 and 23 namely having 10 for header ,20 for detail and 30 for footer.
here is the sample file
DDWTYBILL13092502572 1000000112\\NHLSFS\ORACLE\ORACLE\BILLING\VERIFY\ 2013/09/25 01:19:08 BILLEND
DDWTYBILL13092502572 2000000212PRIVATE PRIVATE STY5572142 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731543 Suspect TB ?CA, (L) EMPIEEM Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000312PRIVATE PRIVATE STY5572149 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731548 Empyema BPF Ward A2 TYGERBERG HOSPITAL Z03.9 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000412PRIVATE PRIVATE STY5572351 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731584 Suspect TB ?EMPIEEM, ?CA Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000512PRIVATE PRIVATE STY5572352 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA,CN,CELESTE NERINA 09-JAN-1964 TYG A2 DR DU PREEZ 5602181 63301345 TB731585 Suspect TB ?EMPIEEM, ?CA Ward A2 TYGERBERG HOSPITAL Z03.0 Z03.9 05-AUG-201305-AUG-201324-SEP-2013FEND 113.60
DDWTYBILL13092502572 2000000612MAJOR MAJOR STY5577530 010700 INV 12ZTYG000009 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS ZOZI,S,SIYAMBONGA 27-MAR-2010 TYG D3 DR MAHOMED 5602181 113799662 TB731663 Lymphadenitis Ward D3 TYGERBERG HOSPITAL I88.9 Z03.9 H1 07-AUG-201307-AUG-201324-SEP-2013MEND 58.52
DDWTYBILL13092502572 2000000712MAJOR MAJOR STY5577537 010700 INV 12ZTYG000009 06-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS DLAMINI,N,NTLANTLA 09-OCT-1976 TYG F1 DR WZESE 5602181 135524676 TB731666 Suspect TB Ward F1 TYGERBERG HOSPITAL Z03.0 Z03.9 H1 07-AUG-201314-AUG-201324-SEP-2013MEND 58.52
DDWTYBILL13092502572 30003034120000003032ENDYou can create an nXSD using Native Format Builder and use lookAhead attribute to read values at specific position and use that as the choice. You can find an example here
http://docs.oracle.com/cd/E11036_01/integrate.1013/b28994/nfb.htm#BGBBAJFD -
Run function on multiple rows in a layout
Hi,
The client 's requirement is to run function on multiple rows in a layout at the user's will,the easiest way to add a indicator and then use this indicator as the condition in the function,but the problem is how to make this indicator.
The indicator can not be added to the leading column because it can not been check or uncheck manually by the user; the next option is to add it as the data column, but this make the data column look unnormal.
Anybody get better way to do this?
Thanks in advance.Hi JW
Lets say you have used the keyfigure to identify whether the specific record is to be considered in fox and assume that the values for this key figure is 1to consider and 2-not consider then you can input these two values some place in layout in third step and put the excel validation on data column on these values so it will give the drop down box for the these values for data column.
Thanks,
Raj -
How to get multiple records in one row and different column
Hi All,
I am using oracle database 11g
and i have a two tables table_1, table_2
table_1 having columns
emp_no
first_name
middle_name
last_name
email
and table_2 having columns
emp_no
phone_type
phone_number
and having entires
emp_no phone_type phone_number
1001 MOB 9451421452
1001 WEMG 235153654
1001 EMG 652341536
1002 MOB 9987526312
1003 WEMG 5332621456
1004 EMG 59612356
Now i want the output of values with phone type as MOB or WEMG in a single row with different columns
emp_no first_name middle_name last_name email mobile officeno
1001 mark null k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312 null
1003 dany null craig [email protected] null 5332621456
1004 donald finn sian [email protected] null null
can i have any inputs to achive this???
Regards
$sidFrank Kulash wrote:
sonething like this:Frank, you missed aggregate function (pivot requires one). However main thing is it will cause ORA-01748:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k'last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
SELECT *
FROM table_1 t1
JOIN table_2 t2 ON t1.emp_no = t2.emp_no
PIVOT ( max(t2.phone_number)
FOR t2.phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
FOR t2.phone_type IN ( 'MOB' AS mob
ERROR at line 19:
ORA-01748: only simple column names allowed hereYou need to:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k' last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
table_3 as (
select t1.emp_no,first_name,middle_name,last_name,email,
phone_type,phone_number
FROM table_1 t1
LEFT JOIN table_2 t2 ON t1.emp_no = t2.emp_no
SELECT *
FROM table_3
PIVOT ( max(phone_number)
FOR phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
EMP_NO FIRST_ MIDD LAST_ EMAIL MOB WEMG
1004 donald finn sian [email protected]
1003 dany craig [email protected] null 5332621456
1001 mark k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312
SQL>SY. -
I just want multiple bookmark toolbars.
Right click the ui, choose a toolbar (e.g. "Work", "Visuals") etc.
That's it.
Not multiple rows.
Thanks.That is not possible.
Firefox only has one Bookmarks Toolbar item that can hold the bookmarks.
So you can only use an extension that supports multiple bookmarks rows to add an extra row if the current last one gets filled up.
The best workaround is probably to create bookmarks folders on the bookmarks toolbar and open those to access each category.
*https://support.mozilla.org/kb/Bookmark+folders -
Please - immediate help needed parsing csv values into multiple rows
Hello, we have a very immediate need to be able to parse out a field of comma separated values into individual rows. The following is an example written in SQL Server syntax which does not work in Oracle.
The tricky part is that each ROUTES can be a different length, and each CSV can have a different number of routes in it.
Here is an example of the table ("Quotes") of CSV values I want to normalize:
TPNUMBER ROUTES
1001 1, 56W, 18
1002 2, 16, 186, 28
Here is an example of what I need it to look like:
TPNUMBER ROUTES
1001 1
1001 56W
1001 18
1002 2
1002 16
1002 186
1002 28
Here is the "Tally" table for the query below:
ID
1
2
3
4
5
6
7
And finally, here is the query which parses CSV values into multiple rows but which does not work in Oralce:
SELECT TPNUMBER,
NullIf(SubString(',' + ROUTES + ',' , ID , CharIndex(',' , ',' + ROUTES + ',' , ID) - ID) , '') AS ONEROUTE
FROM Tally, Quotes
WHERE ID <= Len(',' + ROUTES + ',') AND SubString(',' + Phrase + ',' , ID - 1, 1) = ','
AND CharIndex(',' , ',' + ROUTES + ',' , ID) - ID > 0
It may be necessary to use a cursor to loop through the CSV table and process each row (a loop within another loop...) but this is beyond my comprehesion of PL/SQL.
Many thanks in advance for your advice/help.
apkNot sure what you are trying to do with the last step, but this should work for the first part. I assume you would use sqlldr but I just did inserts instead. You might need more than 5 "routes" in the csv. You could put some reasonable max on that number of columns:
SQL>create table t_csv
2 (TPNUMBER varchar2(20),
3 ROUTE_1 VARCHAR2(5),
4 ROUTE_2 VARCHAR2(5),
5 ROUTE_3 VARCHAR2(5),
6 ROUTE_4 VARCHAR2(5),
7 ROUTE_5 VARCHAR2(5),
8 ROUTE_6 VARCHAR2(5) );
Table created.
SQL>INSERT INTO t_csv (TPNUMBER,ROUTE_1,ROUTE_2) values( '1001 1', '56W', '18' );
1 row created.
SQL>INSERT INTO t_csv (TPNUMBER,ROUTE_1,ROUTE_2,ROUTE_3) values( '1002 2', '16', '186', '28');
1 row created.
SQL>create table t_quotes(
2 tpnumber NUMBER,
3 routes VARCHAR2(5));
Table created.
SQL>DECLARE
2 L_tpnumber NUMBER;
3 L_route VARCHAR2(5);
4 begin
5 for rec in (select * from t_csv) loop
6 L_tpnumber := SUBSTR(rec.tpnumber,1,INSTR(rec.tpnumber,' ')-1);
7 L_route := SUBSTR(rec.tpnumber,INSTR(rec.tpnumber,' ')+1);
8 insert into t_quotes values( L_tpnumber, l_route );
9 if rec.route_1 is not null then
10 insert into t_quotes values( L_tpnumber, rec.route_1 );
11 end if;
12 if rec.route_2 is not null then
13 insert into t_quotes values( L_tpnumber, rec.route_2 );
14 end if;
15 if rec.route_3 is not null then
16 insert into t_quotes values( L_tpnumber, rec.route_3 );
17 end if;
18 if rec.route_4 is not null then
19 insert into t_quotes values( L_tpnumber, rec.route_4 );
20 end if;
21 if rec.route_5 is not null then
22 insert into t_quotes values( L_tpnumber, rec.route_5 );
23 end if;
24 end loop;
25 end;
26 /
PL/SQL procedure successfully completed.
SQL> select tpnumber, routes from t_quotes;
TPNUMBER ROUTE
1001 1
1001 56W
1001 18
1002 2
1002 16
1002 186
1002 28
7 rows selected. -
Return Code - Query for Multiple Rows as XML
Hi,
I'm executing an MSSQL stored procedure through the "Query for Multiple Rows as XML" activity in LiveCycle ES. I do this through a call statement such as this:
{ call MyStoredProc(?) }
This works great, the stored procedure always returns a record set (with or without records). I use this activity rather than "Call Stored Procedure" because I can transform the record set into XML right away within this activity. Unfortunately any exception arising from invoking this stored procedure cannot be handled within the workflow as this activity does not have an exception handler (lightning bolt). In an attempt to handle at least some exceptions we have decided to use try/catches within the stored procedures and return different error codes. Now the problem I am faced with is that there is no way to retrieve the returned code within any of the SQL activities. We don't want to have to write an execute script for each of these SQL calls. Is there any way to do this? Seems like I'm 95% there.
Thanks
NicThanks for the offer, unfortunately we would need something certified by Adobe.
Nic -
Depicting multiple rows' data in one row
Hi All,
Pls. check the below query:
select manager_id mg_id, employee_id emp_id, last_name name from employees
where manager_id = '100'
and DEPARTMENT_ID = '80'if i run the following query, then o/p comes row wise; like below:
mg_id emp_id name
100 145 Russell
100 146 Partners
100 147 Errazuriz
100 148 Cambrault
100 149 Zlotkeybut if i want the o/p like below; i.e; under manager # 100, all employees' emp_id and name should come in only ONE row NOT in multiple rows:
mg_id emp_id name emp_id name emp_id name emp_id name emp_id name
100 145 Russell 146 Partners 147 Errazuriz 148 Cambrault 149 Zlotkeypls. help me to sort out the above sought o/p.
kindly tell me if there is any posting guidelines (except "Plain Text Help" on the right side) in this forum. i tried a lot to post above two o/p in easily readable format, but couldn't do that.
Edited by: Shariful on Sep 20, 2009 4:28 AM
Edited by: Shariful on Sep 20, 2009 4:29 AMHi,
Shariful wrote:
Hi All,
Pls. check the below query:
select manager_id mg_id, employee_id emp_id, last_name name from employees
where manager_id = '100'
and DEPARTMENT_ID = '80'
if i run the following query, then o/p comes row wise; like below:
mg_id emp_id name
100 145 Russell
100 146 Partners
100 147 Errazuriz
100 148 Cambrault
100 149 Zlotkey
but if i want the o/p like below; i.e; under manager # 100, all employees' emp_id and name should come in only ONE row NOT in multiple rows:
mg_id emp_id name emp_id name emp_id name emp_id name emp_id name
100 145 Russell 146 Partners 147 Errazuriz 148 Cambrault 149 ZlotkeyIf you want all the emp_ids and names concatenated into one big VARCHAR2 column, that's called String Aggregation
[AskTom.oracle.com|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402] shows several different ways to do it.
You can format that one big column so that it looks like separate columns.
If you want each emp_id and name in its own column, that's called Pivoting .
Look up "pivot" for various techniques. If you do not know exactly how many rows were in the original query (and therefore how many columns you'll need in the output), then it will require Dynamic SQL , which can be complicated.
Unfortunately, when you do search for "pivot", mlost of the hits will be things like "Search for pivot and you'll get lots of examples".
Re: Help for a query to add columns is one that actually has some information. It was a question very much like yours.
kindly tell me if there is any posting guidelines (except "Plain Text Help" on the right side) in this forum. i tried a lot to post above two o/p and query in easily readable format, but couldn't do that.Type these 6 characters:
(small letters only, inside curly brackets) before and after formatted text, to preserve spacing.
Maybe you are looking for
-
Need Query to that generate count of rows of all tables
Hi i need a query which gives the result of no.of rows in talbe and coresponding table name. And then i need to compare the same with other DB schema Thanks in advance
-
Dynamic Communication Channel Config
Hi, does anybody of you know if it is possible to configure communication channels dynamically, via script or API? Kind regards, Heiko
-
Fine tuning with 3D roatation tool?
Hi, I'm wondering if there is (and I feel there HAS to be) a way to fine tune movements with the 3D rotation tool. Using the mouse works to an extent, but just like nudging movements with the arrow keys, it's sometimes impossible to get the placement
-
More than 2.5 million requests
Is it possible that I can call Search API more than 2.5 million times in a month? How can I calculate the cost in that case? I could see the price for only fewer than 2.5 million requests in the table below. (datamarket.azure.com/dataset/bing/search)
-
Facetime HD camera - 'There is no connected camera' rMBP
Hi I recently purchased a brand new 15" retina MBP. I am running 10.8.4 I am dissapointed to find the built in Facetime HD camera is not connected on apps such as photobooth, skype or facetime, although sometimes it works directly after start up.