Row Spliting
Is there any method/function available to split a single row into multiple rows using SQL query?
For eg:
Col1 Col2 Col3
COMB AGE 002
P CLM 003
Expected Output
Col1 Col2 Col3
COMB1 AGE 002
COMB2 AGE 002
COMB3 AGE 002
COMB4 AGE 002
COMB5 AGE 002
P1 CLM 003
P2 CLM 003
P3 CLM 003
P4 CLM 003
P5 CLM 003
Regards
Swadhin
I tried to run this query in Toad and SQL Navigator. In both it is not able to read and convert the chr(10).
I have one more problem related to that.
When i a trying insert the result of this to another table, getting the following error.
ORA-01830: date format picture ends before converting entire input string.
First i got a different error which was
ORA-03113: end-of-file on communication channel.
What i assume that even though on screen it splits into multiple columns using the char(10) but internally it is treated as one column only. And insertion may not work for this case. But still trying to figure out if it can be done.
Following is the query which i am using to insert records
insert into temp_pasc
(SELECT HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID ID,
'HMO'||CHR(10)||'PPO'||CHR(10)||'FFS'||CHR(10)||'POS'||CHR(10)||'IND' PARG_PROD_ARR_CD,
HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD CD,
to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS') DDATE,
'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD' LOADNAME
FROM HCS_CLM_SCP
WHERE HCS_CLM_SCP_TYP_CD IN (
SELECT CDCV_DOMN_VAL
FROM RCMS_UCFR_USR_CD_FLTR
WHERE UCFR_FLTR_VAL = 'BUS')
AND HCS_LST_CHG_USRID = 'STULOAD' AND
PARG_PROD_ARR_CD='COMB'
union all
SELECT HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID||CHR(10)|| HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID ID,
'HMO'||CHR(10)||'PPO'||CHR(10)||'FFS'||CHR(10)||'POS'||CHR(10)||'IND' PARG_PROD_ARR_CD,
HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD CD,
to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS') DDATE,
'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD' LOADNAME
FROM HCS_CLM_SCP
WHERE HCS_CLM_SCP_TYP_CD IN (
SELECT CDCV_DOMN_VAL
FROM RCMS_UCFR_USR_CD_FLTR
WHERE UCFR_FLTR_VAL = 'BUS')
AND HCS_LST_CHG_USRID = 'STULOAD' AND
PARG_PROD_ARR_CD='B'
union all
SELECT HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID||CHR(10)||HCS_CLM_SCP_ID|| CHR(10)||HCS_CLM_SCP_ID ID,
'PPO'||CHR(10)||'FFS'||CHR(10)||'POS'||CHR(10)||'IND' PARG_PROD_ARR_CD,
HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD||CHR(10)|| HCS_CLM_SCP_TYP_CD||CHR(10)||HCS_CLM_SCP_TYP_CD CD,
to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS')||CHR(10)||to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS') DDATE,
'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD'||CHR(10)||'SWADLOAD' LOADNAME
FROM HCS_CLM_SCP
WHERE HCS_CLM_SCP_TYP_CD IN (
SELECT CDCV_DOMN_VAL
FROM RCMS_UCFR_USR_CD_FLTR
WHERE UCFR_FLTR_VAL = 'BUS')
AND HCS_LST_CHG_USRID = 'STULOAD' AND
PARG_PROD_ARR_CD='P'
union all
SELECT HCS_CLM_SCP_ID ID, 'HMO' PARG_PROD_ARR_CD, HCS_CLM_SCP_TYP_CD,
to_char(sysdate,'DD-Mon-YYYY HH24:MI:SS') DDATE,'SWADLOAD'
FROM HCS_CLM_SCP
WHERE HCS_CLM_SCP_TYP_CD IN (
SELECT CDCV_DOMN_VAL
FROM RCMS_UCFR_USR_CD_FLTR
WHERE UCFR_FLTR_VAL = 'BUS')
AND HCS_LST_CHG_USRID = 'STULOAD' AND
PARG_PROD_ARR_CD='H')
Thanks and Regards
Swadhin
null
Similar Messages
-
Spliting rows into multiple rows based on time interval
Hi experts need your help for framing query for the below scenarios
Scenario 1
Query should check for priority record(25), if the start_date and end_date of that priority record is the max in that group, records will not have any split.
output will be the same.
DC Store St Date End date Priority
955 3 1/1/2010 12/31/9999 25
966 3 4/5/2011 10/10/2011 50
977 3 10/12/2011 12/12/2012 100
output
DC store St Date End date Priority Rank
955 3 1/1/2010 12/31/9999 25 1
966 3 4/5/2011 10/10/2011 50 2
977 3 10/12/2011 12/12/2012 100 3
Scenario 2
If priority record is not covering the max range, then split the records as shown below,
1. during the time period 1/1/2011 & 4/30/2011 there were no other DC for that store so rank would be 1
2. the next range would be 5/1/2011 to 6/29/2011 we have 2 records in service so the record with low priortiy would be ranked 1 and second priority would be ranked 2
3. similarly, for 6/30/2011 to 10/1/2011 we have 3 records in service and it will be ranked accordingly on the priority.
DC Store St Date End date Priority
966 3 6/30/2011 10/1/2011 25
955 3 5/1/2011 11/30/2011 50
977 3 1/1/2011 12/31/2011 100
output
DC store St Date End date Priority Rank
977 3 1/1/2011 4/30/2011 100 1
955 3 5/1/2011 6/29/2011 50 1
977 3 5/1/2011 6/29/2011 100 2
966 3 6/30/2011 10/1/2011 25 1
955 3 6/30/2011 10/1/2011 50 2
977 3 6/30/2011 10/1/2011 100 3
955 3 10/2/2011 11/30/2011 50 1
977 3 10/2/2011 11/30/2011 100 2
977 3 12/1/2011 12/31/2011 100 1
Scenario 3
This works similar to scenario 2
DC Store St Date End date Priority
966 3 2/1/2011 12/31/2011 25
955 3 1/1/2011 12/31/2012 50
977 3 5/1/2011 06/31/2011 100
output
DC store St Date End date Priority Rank
955 3 1/1/2011 1/31/2011 50 1
966 3 2/1/2011 12/31/2011 25 1
955 3 2/1/2011 12/31/2011 50 2
977 3 5/1/2011 6/30/2011 100 3
955 3 1/1/2012 12/31/2012 50 1
Note: the number of rows coming in input will be dynamic and there are possibilities for the date ranges to overlap.Hi,
Sorry, your requirement are unclear.
What role do dc, store and priority play in this problem? Prioriry obviously has something to do with how rows are split. Why is priority=25 special? Does the number 25 have some speciakl meaning, or does it just happen to be the lowest value of priority? Can 2 (or more) rows have the same priority? if so, can their dates overlap? Include examples in your sample data and results.
I think you want something like this:
WITH all_dates AS
SELECT st_date AS a_date
, priority
FROM table_x
UNION ALL
SELECT end_date + 1 AS a_date
, priority
FROM table_x
, got_break_date AS
SELECT a_date
, LEAD (a_date) OVER (ORDER BY a_date) AS next_date
, MIN (priority) AS min_priority
FROM all_dates
GROUP BY a_date
, paired_data AS
SELECT x.*
, b.*
, GREATEST ( x.st_date
, b.a_date
) AS s_date
, LEAST ( x.end_date
, b.next_date
) AS e_date
, RANK () OVER ( PARTITION BY GREATEST (x.st_date, b.a_date)
ORDER BY x.priority
) AS rnk
FROM table_x x
JOIN got_break_date b ON b.a_date >= x.st_date
AND b.a_date < x.end_date
AND b.min_priority <= x.priority
SELECT dc
, store
, s_date AS st_date
, e_date - CASE
WHEN rnk = 1
AND end_date = e_date
THEN 0
ELSE 1
END AS end_date
, priority
, rnk
FROM paired_data
ORDER BY s_date
, priority
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data, formatted, between \ tags. See the froum FAQ {message:id=9360002}
Point out where the results of the query above are wrong, and explain, using specific examples, how you get those results from the given data in those places.
Always say what version of Oracle you're using. -
Spliting a record into multiple rows
Hi experts, need your help for your to frame a query for the below requirement
Scenario 1
For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
If minimum then select that record alone as shown below
Item DC Store Serviceare Bgn Date Service Area End date Priority
9856698 1469 2952 3/5/2011 12/31/9999 100
9856698 3107 2952 12/10/2011 8/3/2012 35
Item DC Store St Date End date Priority
9856698 3107 2952 12/10/2011 8/3/2012 35
Scenario 2
For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
If not minimum split the records for that group as shown below and select the record which has the lowest priority(35) and with minimum startdate and end date range.
Item DC Store Serviceare Bgn Date Service Area End date Priority
9856698 1469 2952 3/5/2011 12/31/9999 35
9856698 3107 2952 12/10/2011 8/3/2012 100
Item DC Store St Date End date Priority
9856698 1469 2952 3/5/2011 12/9/2011 35
9856698 3107 2952 12/10/2011 8/3/2012 100
9856698 1469 2952 8/4/2012 12/31/9999 35There is a seperate forum for SQL and PL/SQL.
You need to post this at :
PL/SQL
And mark this thread as answered if possible. -
Alv output download to excel sheet spliting into three line
hi,
i have developed alv report with 62 fields (62 colums).when i download this output into excel sheet each line spliting into three line.each field has 20 char length.i want download each row as single line.
i am using local file (ctrl + shift+F9) -> spreadsheet option
please advice me to solve this issue. i am using fm REUSE_ALV_GRID_DISPLAY.
In layout i am using
DATA: min_linesize like sy-linsz, " if initial min_linesize = 80
max_linesize like sy-linsz. " Default 250
min_linesize = 100.
max_linesize = 1000.
gt_layout-zebra = 'X'. "space.
gt_layout-colwidth_optimize = space.
gt_layout-max_linesize = min_linesize.
gt_layout-max_linesize = max_linesize.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_bypassing_buffer = ' '
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET-PF-STATUS'
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
is_layout = gt_layout
is_variant = v_stru_disvar
i_default = 'X'
i_save = 'A'
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_final[]
EXCEPTIONS
program_error = 1
OTHERS = 2
Edited by: Raja Ram on Aug 4, 2009 12:40 PMsolved
-
Split Oracle 11g Table Partition and Insert new rows
Hi,
I have a doubt that i would like to be clarified. I need to split a partition of a table with more than 800 Million records, but at the same time (during the split operation) i need to insert new records (not in the partition that is being splited). Is there any problem/risk doing this? Is the insert ETL process going to fail ?
Thanks in advance
Greetings.
Nuno
Edited by: user13512889 on 1/Set/2011 3:25Hi Enrique,
Thanks for posting in MSDN.
Based on the description, you want to modify the formula for the A1 and B1 cell when you insert a new rows.
Yes, we can use Worksheet.Change to dermin the change of data on the worksheet then we can modify the formula as we wanted. Here is a sample for your reference:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.Range("A1").Formula = "=MAX($A2:$A" & Me.UsedRange.Rows.Count & ")"
Me.Range("B1").Formula = "=MIN($B2:$B" & Me.UsedRange.Rows.Count & ")"
End Sub
You can more detail about Excel VBA developing from link below:
Getting Started with VBA in Excel 2010
Welcome to the Excel 2013 developer reference
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hi, guys I have a table filled in this way and I can't modify the data inside:
F1 F2 F3 F4
1 A null null
1 null B null
1 null null C
2 D null null
2 null E null
2 null null F
3 G null null
3 null H null
3 null null I
Is there a way to see the data in this other way (without any NULL)?:
F1F2F3F4
1 A B C
2 D E F
3 G H I
Thank you
Alex
Message was edited by:
user566533
Message was edited by:
user566533> About the Model clause, I am sure Rob can do better and I am waiting for his solution ;-)
This looks way too complex for the type of question for me. And as said you are generating more rows than necessary that have to be filtered by a subquery in the final step.
Although I'm convinced that the original poster does not have rows with data in more than one of the columns, I could not resist the challenge and came up with this:
SQL> create table mytable
2 as
3 select 1 f1, 'A' f2, null f3, null f4 from dual union all
4 select 1, 'B', null, null from dual union all
5 select 1, null, 'C', null from dual union all
6 select 1, null, 'D', null from dual union all
7 select 1, null, 'E', null from dual union all
8 select 1, null, null, 'F' from dual union all
9 select 2, 'G', null, null from dual union all
10 select 2, 'I', null, null from dual union all
11 select 2, 'H', null, null from dual union all
12 select 2, null, 'T', null from dual union all
13 select 2, null, 'K', null from dual union all
14 select 2, 'U', null, 'J' from dual
15 /
Tabel is aangemaakt.
SQL> select f1
2 , max(decode(l,2,f)) f2
3 , max(decode(l,3,f)) f3
4 , max(decode(l,4,f)) f4
5 from ( select t.*
6 , row_number() over (partition by f1, l order by f) rn
7 from ( select f1
8 , l
9 , decode(l,2,f2,3,f3,4,f4) f
10 from mytable
11 , (select 2 l from dual union all select 3 from dual union all select 4 from dual)
12 ) t
13 where f is not null
14 )
15 group by f1
16 , rn
17 order by f1
18 , rn
19 /
F1 F2 F3 F4
1 A C F
1 B D
1 E
2 G K J
2 H T
2 I
2 U
7 rijen zijn geselecteerd.which I think looks easier.
> Is there a way to delete rows in model other than using subquery?
Not really. You can leverage the "RETURN UPDATED ROWS" clause to not return the original rows, in other words: delete the original rows from the result set. But generating extra cells that are to be deleted later on, generally does not make much sense and (therefore?) there is no way to delete rows in the model clause. So the subquery is the way to do it if you really want to.
Note that I use the subquery technique too for string aggregation using the model clause, because I tested the subquery filter is more performant than the RETURN UPDATED ROWS clause.
Regards,
Rob. -
Refresh Dlookup data in the active row of a datasheet after modifying data
Difficult to explain - so I will give you my scenario -I have three tables Student, Home Room and Teacher - the Student is linked to a home room and the home room is linked to the Teacher. In my form using Student, I show the student, the home room and the
Teacher for that home room. (The student file has the HomeRoomID in it). I show the teacher by looking up the teacherID using the HomeRoomID (using Dlookup on the HomeRoom table to get the teacherID), save it to a textbox IDTeach. Using another Dlookup on
the Teacher table using IDTeach I get the teachers name in a textbox call TeacherLast
Works fine! - however if the home room is changed, using a combobox, the teachers name does not change -it does change if the data is refreshed (The HomeRoomID in the Student Table is of course changed)
My goal is to have the teacher name change in the row where the when the homeroom is changed.
I went to the Event - after Update on the combo box and tried to update the teacher ID and teacher name by using
Private Sub HomeRoom_AfterUpdate()
Form![IDTeach] = DLookup("[TeacherID]", "Home Rooms", "[HomeRoomID]=Form![HomeRoomID]")
Form![TeacherLast] = DLookup("[Last]", "Teacher", "[TeacherID] = Form![IDTeach]")
End Sub
But this doesn't work (Run time error 2448) because, I believe, it is trying to update all the rows in the datasheet.
Is there some way to qualify these statement to only work on the current row like
Form.currentrow.IDTeach = DLookup("[TeacherID]", "Home Rooms", "[HomeRoomID]=Form.currentrow[HomeRoomID]")
or is there and easier way (or anyway for that matter)?
ThanksThere is a 1 to 1 relation between the student and the teacher - a 1 to 1 relation between the student and the home room, but a 1 to many relation between the teacher and the room.
Surely not? It would be a very exclusive educational establishment where every student had their own personal teacher, and their own personal room. A one-to-one relationship type between Teachers and Rooms is understandable, but is not the relationship
type between Rooms and Students one-to-many? The relationship type between Teachers and Students would also be one-to-many of course, but no enforced relationship needs to be created for this as it is implicit in an enforced relationship between Rooms
and Students. Diagrammatically the model would be:
Teachers----Rooms----<Students
A form simply needs to be based on a query which joins the three tables in this way with editable controls bound to the columns from Students and a read-only control bound to the Teacher column from Teachers. The control bound to the foreign key Room
column in Students would be a combo box. Once a room is selected the Teacher for that room would automatically show in the read-only text box bound to the Teacher column.
To make a control read-only BTW set its Locked property to True and its Enabled property to False.
Ken Sheridan, Stafford, England -
Javascript - is there something like an "active row count" property??
Lets say I have a tabular form. Every time I use the form, the # of rows returned by the query will vary. Maybe first time I go to the page, the select statement returns only 5 rows, but the next day it returns 25 rows.
Is there some type of system variable to stores the # of rows visible on the page at a given time within this tabular form?
I realize that if I have an tabular form item with an id of f03 for example, then on each row it will be referenced as f03_0001, then f03_0002 on the next row and then f03_0003 on the next row etc...
In pseudocode, here is what I want to do:
For i = 1 to ACTIVE_ROW_COUNT (assuming this is the # of rows in the HTML table)
perform some operation on 'f03_000' + ACTIVE_ROW_COUNT
Do you see what I'm after? I checked the APEX api, but I couldn't find such a property. It seems like you can't do much if you can't figure out this current index # or the max on the page.
Also, I tried playing around with the "this" keyword in hopes of finding a pointer to the "current item" that would have triggered the onchange event, but no luck either.
Thanks in advance.Hi:
Within javascript you can reference the columns of the tabular form as
<script>
col1 = document.forms0.f01; // the first updateable column of your report
alert (col1.length) ; // number of rows
</script>varad
Edited by: varad acharya on Dec 8, 2008 5:53 PM -
Quantity fields not getting displayed in the second total row
Hi,
As per the requirement I have to display 2 total rows for an ALV report using CL_GUI_ALV_GRID. I am able to get the first total row properly using method get_subtotal(). However for the next total row only the character fields are getting displayed and the quantity fields are coming blank.
The second total row will have different values based on a formula.
Please help me out in resolving the issue.
Thanks,
AbhishekYou can provide first row as the SUBTOTAL and next row as the TOTAL.
Get one extra column on which you can do the SUBTOTAL.
Regards,
Naimesh Patel -
Hi,
Is there a method that get the all the values of a row? I've gone through the java api but didn't found one, but wanted to be sure.
If not I'll have to do getValueAt for every column?
GrtzHere is one possible implementation using RowTableModel (a self made class).
To access a row, we can use this: Product product = (Product) model.getRow(rowIndex);
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
public class Tabel extends JPanel {
private JTable table;
private JTextField filterText;
private TableRowSorter<MyTableModel> sorter;
private String output;
private final MyTableModel model;
public Tabel() {
//Create a table with a sorter.
model = new MyTableModel();
sorter = new TableRowSorter<MyTableModel>(model);
table = new JTable(model);
table.setRowSorter(sorter);
table.setPreferredScrollableViewportSize(new Dimension(500, 200));
table.setFillsViewportHeight(true);
//Single selection
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
//Making sure columns can't be dragged and dropped
table.getTableHeader().setReorderingAllowed(false);
//Double click event
table.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent mouseEvent) {
if (mouseEvent.getClickCount() == 2) {
System.out.print(output);
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
add(scrollPane);
JPanel form = new JPanel();
JLabel l1 = new JLabel("Filter Text:");
form.add(l1);
filterText = new JTextField(15);
//Whenever filterText changes, invoke newFilter.
filterText.getDocument().addDocumentListener(
new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
newFilter();
public void insertUpdate(DocumentEvent e) {
newFilter();
public void removeUpdate(DocumentEvent e) {
newFilter();
l1.setLabelFor(filterText);
form.add(filterText);
add(form);
* Update the row filter regular expression from the expression in
* the text box.
private void newFilter() {
RowFilter<MyTableModel, Object> rf = null;
//If current expression doesn't parse, don't update.
try {
rf = RowFilter.regexFilter("(?i)" + filterText.getText(), 0); //"(?i)" => Zoeken gebeurd case-insensitive
} catch (java.util.regex.PatternSyntaxException e) {
return;
sorter.setRowFilter(rf);
class MyTableModel extends RowTableModel {
private final List<Product> mData;
private final List<String> cNames;
public MyTableModel() {
super(Product.class);
mData = new ArrayList<Product>();
mData.add(new Product("Frontline Small", 5, 1));
mData.add(new Product("Frontline Medium", 10, 2));
mData.add(new Product("Frontline Large", 15, 1));
mData.add(new Product("Frontline Extra Large", 20, 2));
mData.add(new Product("Frontline spuitbus", 7.5, 3));
cNames = new ArrayList<String>();
cNames.add("Product");
cNames.add("Prijs");
cNames.add("Aantal stuks beschikbaar");
setDataAndColumnNames(mData, cNames);
setColumnClass(0, String.class);
setColumnClass(1, Double.class);
setColumnClass(2, Integer.class);
public Object getValueAt(final int rowIndex, final int columnIndex) {
switch (columnIndex) {
case 0:
return mData.get(rowIndex).getDescriction();
case 1:
return mData.get(rowIndex).getPrice();
case 2:
return mData.get(rowIndex).getNumber();
return null;
@Override
public Class getColumnClass(int column) {
return super.getColumnClass(column);
private static void createAndShowGUI() {
//Create and set up the window.
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
Tabel newContentPane = new Tabel();
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(final String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
class Product {
private String descriction;
private double price;
private int number;
Product(final String descriction, final double price, final int number) {
this.descriction = descriction;
this.price = price;
this.number = number;
public String getDescriction() {
return descriction;
public void setDescriction(final String descriction) {
this.descriction = descriction;
public int getNumber() {
return number;
public void setNumber(final int number) {
this.number = number;
public double getPrice() {
return price;
public void setPrice(final int price) {
this.price = price;
@Override
public String toString() {
return descriction + ", " + price + ", " + number;
} -
Sales quote layout rows doubled in crystal report layout
Dear All,
Sales quote layout rows doubled in crystal report layout.
In sales quote layout the rows are doubled. Even in the standard layout. If the quote contains only two rows. Then it is doubled as 4 rows in the crystal report layout.
It is happening in the particular database. Other database are working fine. I request you people to help me to overcome this issue.
Regards,
SivaHi Siva,
If this is regarding CR in SAP B1 then please repost to the SAP Business One Application space.
-Abhilash -
Hi experts...
I want single row in alv report.
I have use loop for fatch data into internal table using loop when i am passing data in alv report then the data comes according loop. i want onlu one data in alv row.
how can i do such, plz help me.decleare two internal table.
read table itab into wa index 1.
append wa to itab2.
pass itab2 only one record display. -
Field should not display in the subtotal row in ALV report after sorting .
we have a requirement, after sorting and subtotaling, the output in ALV is -
vbeln amount1 amount2 amount3
123 11 12 13
123 12 13 14
123 23 25 27
133 11 12 13
133 12 13 14
133 23 25 27
Now the customer wants the ALV outpput in this fashion -
123 11 12 13
123 12 13 14
23 25 27 --->123 (vbeln) should not come in subtotaling row
133 11 12 13
133 12 13 14
23 25 27--->133(vbeln) should not come in subtotaling rowHi,
if it helps you could create a hierachy. In this way you can define the field catalog for the lines and for the subtotal columns. The only thing is that you would always show the subtotal rows.
You have references of hierachy alvs in
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f
ALV Hierarchy
alv hierarchy
In this case it also sorts
Sorting for ALV hierarchy
I hope it helps.
Edited by: Oscar Pecharroman on Aug 2, 2010 1:13 PM -
We are running Oracle BI Discoverer Viewer version 11.1.1.4.0. When we upgraded to this version we lost some functionality. In the previous version the report displayed the number of rows the query returned. Now the row totals display only under certain conditions. For instance, I have a inventory report name INV-REP-120 and it prompts the user for 6 parameters & displays 6 columns of data. One of the parameters is named ‘Keyword' and I’ll use this one in the problem description. When I set the keyword parameter to ‘HINGE’ The bar at the top of the results sheet it displays:
‘Rows 1-25 of 81, Columns 1-6 of 9’
When I change the keyword to ‘TUBE’ the viewer displays:
‘Rows 1-25, Columns 1-6 of 9’
The total rows are not displayed but the number of pages. It appears that if the total number of rows is less than 200 then the row total is displayed. I changed the rows displayed from 25 to 100 and scrolled down to the last page and now the reports displays:
‘451 – 458 of 458, Columns 1-6 of 9’
When I use the key word TEE I get :
‘Rows 1-50, Columns 1-6 of 9’
There are 596 tees, which would be about 12 pages of 50 rows. I noticed that at the top of table there is a field ‘Page 1 of 5.’ It looks like if there are more than 5 pages it does not display the total number of rows.
There seems to be some interaction between the total number of rows the number of rows per page and perhaps a setup on the back-end that determines whether or not the row total is displayed. How can I configure the viewer at the front-end and/or back-end to consistently display the row total for a report? Is there a Discoverer preference located in the pref.txt in the apps server that controls this?Hi,
You can inform to your SP to edit the table EUL4_documents
and ask him to modify the name of the report that is stored in the column DOC_NAME .There is absolutely no necessary to open the work book that is stored in the database and change the work book name
Regards
Swamy! -
Classic report - Condition evaluated for every row
APEX 4.2.2
I am seeing something strange in a classic report region. A report started to fail at run-time with a strange error about bad syntax. When I run the page in debug mode, I see the following
print column headings
rows loop: 30 row(s)
...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
end;
......Result = false
...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
end;
......Result = false
...Execute Statement: begin wwv_flow.g_boolean := 'string with a embedded ' single quote' is not null;
end;
......Result = true
Looks like the APEX engine is evaluating a boolean expression after rendering and each and every row in the report. And for some strange reason, it is using a piece of data from my query's resultset and failing because of the bad syntax introduced due to the single-quote in the string.
I have never seen this before. Any idea what is going on?
ThanksHowdy Paul, sorry should have provided all the details. No, this is a standard generic column template. Ah, you are right, drat I should have looked closer. The template has use a condition to show either a highlighted row or normal one. Sorry for the false alarm, I can take it from here. Enjoy your flight :-)
Maybe you are looking for
-
Error while generating xml file Data Model
Hi , I am creating data mode in OBIEE through the query builder and trying to generate xml from it but the following exception occurs while generating the XML "The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please corre
-
The tool for testing developed system
We have already developed a system base on WebAS.Is there some test tool for the developed system such as J Unit in Java?Thanks.
-
Will not load software updates with a warning
Upon starting windows a box comes up that stes now loading mozilla updates, mozilla will resume ....then a window comes up that says it it downloading the update and that it is critical. Mozilla will start but the update download keeps running in the
-
A good Java book for beginners?
Hello I am new to Java language. This year I will go in university (computer science major) so I thought I could study a bit during the summer. So I have choosen to learn the basics (or more) of the Java language. I dont know any other programming la
-
Maximum number of live tiles per size?
Is there a maximum of live tiles per tile size or overall?