Obj or view to flatten "cell" records into "row" record
I have ProdPrice records which are essentially "cells" in a price matrix.
create table ProdPrice {
ProdNum number (12,0),
Quality char(1),
Condition char(1),
Price number(15,3),
... (other stuff)
with primary key (ProdNum, Quality, Condition)
where Quality is in [ 0, 1, 2, 3 ] and Condition in [ 0, 1, 2 ]
I want to create a view or object view representing one "row"
in the matrix with that "row" containing all prices with the same Quality. Essentially I want to "flatten" the cells into Quality "rows"
for viewing and editing.
An example Quality "row" type might look like:
create type ProdPriceQualityRow {
ProdNum number (12,0),
Quality char(1),
PriceCondition0 number(15,3),
PriceCondition1 number(15,3),
PriceCondition2 number(15,3),
PriceCondition3 number(15,3)
I think I now need to
create view ProdPriceQualityRowView of type ProdPriceQualityRow
with object identifier (ProdNum, Quality) as ....
but I'm not sure how to complete the view / object and its associated instead of trigger.
Does anyone have any examples of how to create views / objects / triggers that work like this?
I've read most of the Oracle Application Developers Guide - Object Relational Features but can not seem to warp their examples into the above.
Thanks
R.Parr
Temporal Arts
For examples goto askTom.Oracle.com and search for "pivot table".
Similar Messages
-
Bj or view to flatten "cell" records into "row" record
I have ProdPrice records which are essentially "cells" in a price matrix.
create table ProdPrice {
ProdNum number (12,0),
Quality char(1),
Condition char(1),
Price number(15,3),
... (other stuff)
with primary key (ProdNum, Quality, Condition)
where Quality is in [ 0, 1, 2, 3 ] and Condition in [ 0, 1, 2 ]
I want to create a view or object view representing one "row"
in the matrix with that "row" containing all prices with the same Quality. Essentially I want to "flatten" the cells into Quality "rows"
for viewing and editing.
An example Quality "row" type might look like:
create type ProdPriceQualityRow {
ProdNum number (12,0),
Quality char(1),
PriceCondition0 number(15,3),
PriceCondition1 number(15,3),
PriceCondition2 number(15,3),
PriceCondition3 number(15,3)
I think I now need to
create view ProdPriceQualityRowView of type ProdPriceQualityRow
with object identifier (ProdNum, Quality) as ....
but I'm not sure how to complete the view / object and its associated instead of trigger.
Does anyone have any examples of how to create views / objects / triggers that work like this?
I've read most of the Oracle Application Developers Guide - Object Relational Features but can not seem to warp their examples into the above.
Thanks
R.Parr
Temporal ArtsFor examples goto askTom.Oracle.com and search for "pivot table".
-
My HP Officejet 8500a All-In-One forwards faxes (as a tiff file) to my iphone. Can only view/receive 1st page, embedded into email as a non-attachment. Iphone receives email(s) pdf attachments well. What can I do?
Try this app
http://itunes.apple.com/us/app/fax-reader/id406902152?mt=8 -
How to view po number in sap into t -code f.13
how to view po number in sap into t -code f.13
Hi,
You will able to see under Purchasing Doc Field when you execute F.13 (Actually this program will match the parameters with PO no only with GR/IR doc to get clear.
Regd,
Khan. -
How to view which users have logged into Hyperion Planning
Hi all,
I'm trying to determine the best way to view users that have logged into Hyperion Planning (who and when). Is there an option in Shared Services or can this be viewed through Planning by the administrator? Any insight would be greatly appreciated.
Thanks!Planning has never been the best at providing that information, you can look at the statistics page in planning which is pretty poor in my opinion.
The other option is audting but once again it doesn't really audit users logging in and out.
Cheers
John
http://john-goodwin.blogspot.com/ -
Gantt view - multiple dates in the same row
Hi,
I created gantt view showing employees' vacations. Some of them have their holidays split into several dates (periods). How can I show those multiple dates in the same row in the gantt view? I can only show start date and end date of one vacation, but would
like to enter multiple periods to be shown in the gantt view, in the same row.
Thanks.You can't using the OOTB gantt chart so you would have to look at custom development or 3rd party web parts.
Such as (blatant plug but it directly answers the OP question) my own companies Planner web part.
http://www.pentalogic.net/sharepoint-products/planner
The By Category view puts timelines on the same row so its ideal for things like vacation planning, room booking etc.
This page shows it in use.
http://blog.pentalogic.net/2010/08/sharepoint-staff-vacation-planner-absence-wall-chart-dashboard/ -
Compare two cells in a row and group of rows
Tuesdays 1st 2nd 3rd 4th 5th MB
Jan 4, 2011 7 14 21 28 36 32
Jan 11, 2011 5 15 25 28 38 16
Jan 18, 2011 2 17 25 28 38 25
Okay, say the above is my table, how do I compare two cells in a row for two numbers? Say I wanted to find out if row A2 contained a 7 and a 28?
I thought an IF formula might do it, but can't figure it out.
Thanks in advance!
JimHead Crab wrote:
Tuesdays 1st 2nd 3rd 4th 5th MB
Jan 4, 2011 7 14 21 28 36 32
Jan 11, 2011 5 15 25 28 38 16
Jan 18, 2011 2 17 25 28 38 25
Okay, say the above is my table, how do I compare two cells in a row for two numbers? Say I wanted to find out if row A2 contained a 7 and a 28?
"A2" is an address for a single cell, not a row. Its current content, assuming no empty rows above or empty columns left of what's shown, is "Jan 4, 2011". Perhaps you mean Row 2, or the range B2:G2.
Assuming that you want to know 'if' (or 'how many times') two specific numbers occur in the range of cells from column B to column G in a single row, COUNTIF is the function you want.
Place the two target numbers into cell I1 and J1.
Enter the formula below into I2:
=COUNTIF($B2:$G2,I$1)
Fill the formula right into J2, then fill both down to row 4.
You'll get a count of the occurrences of each number.
If you want only a "Yes" (both numbers appear in the range) or "No" (neither of the numbers appear, or one appears but not the other), use this variation (in I2 or J2):
=IF(AND(COUNTIF($B2:$G2,I$1)>0,COUNTIF($B2:$G2,J$1)>0),"Yes","No")
Regards,
Barry -
Hi All,
I need help in building view which actually can show columns data as row.
e.g.
row is as follows
Name Age Salary
ABC 25 10000
BBC 28 12000
The above tables data I want to get as
Name ABC BBC
Age 25 28
Salary 10000 12000
Thanks in advance.Even if I don't really understand such requirement, I wrote some times ago such function to play around that :
Re: Converting Columns into rows
Nicolas. -
Merging cells in a row...
I'd like to be able to turn the first table into the second. I see that there is a cell merge, but I can't seem to figure out the syntax.
Thanks in advance for your help.rowCellCount is simply either rows.cells.length or rows.columns.length -- without trying, I think the first gives the actual count of cells in a row (merged or not), and the second the original number of columns.
To merge, use http://jongware.mit.edu/idcs5js/pc_Cell.html#merge like this:
table = app.selection[0];
if (table.hasOwnProperty("baseline")) table = table.parent;
if (table instanceof Cell) table = table.parent;
if (table instanceof Column) table = table.parent;
if (table instanceof Row) table = table.parent;
if (table instanceof Table)
table.rows[0].cells[0].merge (table.rows[0].cells[1]);
.. the first 6 lines are to make sure the script knows where it is. This way, it will work with the text cursor inside a cell (every text object has a "baseline" property; I think it's a trick I learned from Dave Saunders), or with a cell, column, row, or the entire table selected. After locating the table, it's just a matter of following the description of "Cells: Merge".
Oh wait, now I have a table, 3 cells per row and the first 2 cells merged, to test my first assertion on. Running this
alert (table.rows[0].cells.length);
alert (table.rows[0].columns.length);
alert (table.rows[1].cells.length);
alert (table.rows[1].columns.length);
alerts "2", "3", "3" and "3", just as I thought. -
Hi all,
From the example given in the following link I undersatand that we can convert comma seperated values into rows using a single SQL.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:73830657104020
But when I try this with multiple rows it gives me duplicate records.
i.e
CREATE TABLE tst1
(problem_no VARCHAR2(10),
cr_tracking_no VARCHAR2(256))
INSERT INTO tst1 VALUES('P1','106,211,243,250')
INSERT INTO tst1 VALUES('P1','1966,22023,38023,53914,56533')
SELECT
FROM
(SELECT
problem_no,
SUBSTR (cr_tracking_no,
INSTR (cr_tracking_no, ',', 1, LEVEL ) + 1,
INSTR (cr_tracking_no, ',', 1, LEVEL+1) - INSTR (cr_tracking_no, ',', 1, LEVEL) -1 )
AS token
FROM (
SELECT problem_no, ','||trim(cr_tracking_no||',') cr_tracking_no
FROM tst1 )
CONNECT BY LEVEL <= LENGTH(cr_tracking_no)-LENGTH(REPLACE(cr_tracking_no,',',''))+1)
WHERE token IS NOT NULL
the desired output is
SQL> SELECT
2 *
3 FROM
4 (SELECT
5 distinct problem_no,
6 SUBSTR (cr_tracking_no,
7 INSTR (cr_tracking_no, ',', 1, LEVEL ) + 1,
8 INSTR (cr_tracking_no, ',', 1, LEVEL+1) - INSTR (cr_tracking_no, ',', 1, LEVEL) -1 )
9 AS token
10 FROM (
11 SELECT problem_no, ','||trim(cr_tracking_no||',') cr_tracking_no
12 FROM tst1 )
13 CONNECT BY LEVEL <= LENGTH(cr_tracking_no)-LENGTH(REPLACE(cr_tracking_no,',',''))+1)
14 WHERE token IS NOT NULL
15 /
PROBLEM_NO TOKEN
P1 106
P1 1966
P1 211
P1 22023
P1 243
P1 250
P1 38023
P1 53914
P1 56533
[pre]
The above query return 46 row (Duplicates) , whereas the expected number of record is 9
Kindly tell me what is wrong and how to get the desired rows without using distinct.
Thanks in advance,
Jaggyam
null
nullYou are absolutely right about not wanting to use the distinct function here.
To make it work, you'll have to shortcut the hierarchy loop like this:
SQL> SELECT *
2 FROM ( SELECT problem_no
3 , SUBSTR
4 ( cr_tracking_no
5 , INSTR (cr_tracking_no, ',', 1, LEVEL ) + 1
6 , INSTR (cr_tracking_no, ',', 1, LEVEL+1) - INSTR (cr_tracking_no, ',', 1, LEVEL) -1
7 ) AS token
8 FROM ( SELECT problem_no
9 , ',' || trim(cr_tracking_no) || ',' cr_tracking_no
10 , rownum rn
11 FROM tst1
12 )
13 CONNECT BY LEVEL <= LENGTH(cr_tracking_no)-LENGTH(REPLACE(cr_tracking_no,','))-1
14 AND connect_by_root rn = rn
15 )
16 WHERE token IS NOT NULL
17 /
PROBLEM_NO TOKEN
P1 106
P1 211
P1 243
P1 250
P1 1966
P1 22023
P1 38023
P1 53914
P1 56533
9 rows selected.More techniques for doing this can be found here:
http://rwijk.blogspot.com/2007/11/interval-based-row-generation.html
Regards,
Rob. -
How to create CSV data with a cell including two rows?
Hi guys,
i am creating CSV using "comma" as seperator for columns, "return" as seperator for rows.
But how can I create a cell which includes two rows?
I want to do following:
cell1 cell2 cell3
XXXXX YYYYY ZZZZZ
in cell2 YYYYY, there are two sub rows:
YLine1.1 YLine1.2 YLine1.3
YLine2.1 YLine2.2 YLine2.3
Which kind of seperator can I use for these sub rows?
so to say(XML mode):
<row>
<Col1>XXXXX</Col1 >
<Col2>
<row>
<col1>YLine1.1</col1>
<col1>YLine1.2</col1>
<col1>YLine1.3</col1>
</row>
<row>
<col1>YLine2.1</col1>
<col1>YLine2.2</col1>
<col1>YLine2.3</col1>
</row>
</Col2 >
<Col3>ZZZZZ</Col3 >
</row>
It is very kind of you to give me some hint!
Regards,
Liying
Message was edited by:
Liying Wang
Message was edited by:
Liying WangHi Wang Liying,
I tried with Excel. A Cell with 2 rows saved as CSV shows that the cells contents are enclosed in hyphens "b row 2 b" and the two rows ins one cell are separated with HEX 0A. This is a simple Line feed. The sequence to build this would be in ABAP
concatenate
<row1>
CL_ABAP_CHAR_UTILITIES=>NEWLINE
<row2>
into cell.
I did not take the time to try on system, but I tried to open with excel: It works with Windows.
Regards,
Clemens -
Problem in displaying the data of columns into rows in sap script
hi,
i am working on a sap script and i have to display the dat which is displayed in column into rows but it is not displaying it properly.
eg, C
12.1
Si
5.5
it is displaying the data right now like this but i want to display the data like this:-
eg, C Si
12.1 5.5
plzzprovide me guidelines how to solve this problem.hi,
i am using this code to display the data:-
plzz provide me guidelines where i am getting wrong?
TOPparCOMPONENT DESP,,,,,, INS. LOT #, , , , , , MIC,,,,,,,,,, MIC VALUEparENDTOPparFINAL
PROTECT
IF &I_FINAL-PRUEFLOS& NE '000000000000'
&I_FINAL-MAKTX(23)&&i_final-prueflos(12Z)&
&I_FINAL-kurztext(25)&
&I_FINAL-original_input(8)&
ELSE
&I_FINAL-MAKTX(23)&
&I_FINAL-kurztext(25)&
&I_FINAL-original_input(8)&
ENDIF
ENDPROTECT
ITEMHEAD
POSITION WINDOW
SIZE WIDTH +0 . 4 CH HEIGHT +1 LN
BOX FRAME 10 TW
BOX HEIGHT '1.35' LN INTENSITY 20
IF &PAGE& = '1'
BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '43' LN FRAME '10' TW
For horizontal line at top
BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
COLUMN LINES...
END OF COLUMN LINES...
BOX XPOS '0' CH YPOS '43' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '43' LN FRAME '10'TW
ELSE
COLUMN LINES...
END OF COLUMN LINES...
BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
BOX XPOS '0' CH YPOS '0' CM WIDTH '45' CM HEIGHT '0' LN FRAME '10' TW
BOX XPOS '20' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
BOX XPOS '0' CH YPOS '47' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '47' LN FRAME '10'TW
ENDIF
LINEFEED
NEWPAGE
NEW-PAGE
provide me guidelines to solve this problem.
Edited by: ricx .s on Mar 13, 2009 5:58 AM -
In Web Dynpro ABAP, Can we merge two cells of a row in a table ?
In Web Dynpro ABAP, Can we merge two cells of a row in a table ?
Hallo Jagannatha,
the new table feature is available in SAP NetWeaver 7.0 EhP2 (SAP ERP 6.0 EhP5, SAP Business Suite 7i2010) named 'TableMultiEditorCell'. See [SAP Online Help|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm] for more details ...
"This UI element is a table cell variant that enables several UI elements to be placed in one table cell. This type of cell can be used for "one click actions". ...
Regards, Bertram -
How do I change the background of a single cell or a row in a table?
How do I change the background of a single cell or a row in a
table? I doesn't seem to be letting me do that.Are you using the latest DW? If so, then it isn't letting you
because
bgcolor is deprecated and shouldn't be used.
The correct way is to use css to define the background of a
cell
CSS:
.blackcell {background-color: black;}
HTML:
<td class="blackcell">whatever in the cell</td>
Nadia
Adobe® Community Expert : Dreamweaver
CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
~ Template Customization ~
http://www.csstemplates.com.au
Spry Widget Examples
http://www.dreamweaverresources.com/spry-widgets/
"dm25" <[email protected]> wrote in message
news:f4jr5h$luu$[email protected]..
> for some reason that doesn't always work. When I click
inside a cell, it
> doesn't give me an option to change the background
color. -
Numbers formula for "sum of all cells above this row"
Is there a way, using the cell formulas in Numbers, to say "sum of all the cells above this row"? I'm trying to make a ledger of sorts, and I want to have a column that is "how much you've spent so far" for each entry, which is the sum of all the "Price" cells for that row and above.
Is this possible? Thank you in advance for your help!Hi Alexander,
You could start with a table like this:
To get started,
Cell D2 =C2
Then to continue,
Formula in D3 (and Fill Down)
=D2+C3
Row 10 is waiting for you to fill in details... .
Regards,
Ian.
Maybe you are looking for
-
Problem with opening apps on iPad Mini
I just signed into a new wireless network (which requires credentials to be entered when you first open Safari) and some of my internet-dependent apps will not work. iMessage, Facetime, and SnapChat work sometimes, but not consistently. Things like F
-
Error when trying to start WLST in Jython 2.5 interpreter
Hello! I try to get WLST working in a standalone jython interpreter. What i did: - installed Jython 2.5.4 RC1 - created a startscript for Jython (taken from wlst.sh) WL_HOME="/opt/oracle/wlserver_10.3" umask 027 # set up common environment WLS_NOT_BR
-
Java client for WCF STS service without netbeans etc.?
I want to communicate with a WCF service that uses an STS. I want to know what I am doing, so I don't want to use netbeans. If I have to use netbeans to figure it out for myself, can you help me interpret this part of the documentation for metro: ht
-
TS4083 Mail says I have unread emails, but no emails are marked as unread?
When checking my mail using icloud.com, 2 of my VIP folders are saying I have unread emails, when i go into the folders I have no emails marked as unread. I have checked on my macbook mail and I also have no emails unread on there either. How do i kn
-
HT201472 Stolen ipod, can't get anywhere with the support
My ipod touch was stolen in the week, and I haven't set up the 'find my iphone/ipod' setting on icloud yet. Wanted to talk to someone about how to proceed, so went to the support area. All general topics were about use, clicked on 'other topic', wrot