Why am i getting extra rows in pivot/rollup?
For this weekly PRoduct List Report by Period, rolled up to district, and company.
1) Why am I getting an extra rollup record ( like 4th record)? Otherwise Totals are correct.
2) When period only contains 4 weeks, There should only be 4 weeks, not 5, HOw can I prevent the Week 5 columns.
Note, Districtname, and regionname are only included to help me visualize complex decode statements.
WITH dummydata AS
SELECT '0177' AS storenbr, 2 AS period, 1 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 16 AS sold, 100 AS total from dual UNION ALL
SELECT '0177' AS storenbr, 2 AS period, 1 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 87 AS sold, 100 AS total from dual UNION ALL
SELECT '0177' AS storenbr, 2 AS period, 2 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 26 AS sold, 100 AS total from dual UNION ALL
SELECT '0177' AS storenbr, 2 AS period, 2 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 97 AS sold, 100 AS total from dual UNION ALL
SELECT '0277' AS storenbr, 2 AS period, 1 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 16 AS sold, 100 AS total from dual UNION ALL
SELECT '0277' AS storenbr, 2 AS period, 1 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 87 AS sold, 100 AS total from dual UNION ALL
SELECT '0277' AS storenbr, 2 AS period, 2 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 26 AS sold, 100 AS total from dual UNION ALL
SELECT '0277' AS storenbr, 2 AS period, 2 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 97 AS sold, 100 AS total from dual UNION ALL
SELECT '6504' AS storenbr, 2 AS period, 1 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 18 AS sold, 100 AS total from dual UNION ALL
SELECT '6504' AS storenbr, 2 AS period, 1 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 89 AS sold, 100 AS total from dual UNION ALL
SELECT '6504' AS storenbr, 2 AS period, 2 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 28 AS sold, 100 AS total from dual UNION ALL
SELECT '6504' AS storenbr, 2 AS period, 2 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 99 AS sold, 100 AS total from dual
, store_details as
SELECT '0177' AS storenbr, 'Bingham' as districtname, 'R-15 James' as regionname, 'C-Atlantic' as companyname from dual UNION ALL
SELECT '0277' AS storenbr, 'Dunley' as districtname, 'R-15 James' as regionname, 'C-Atlantic' as companyname from dual UNION ALL
SELECT '6504' AS storenbr, 'Murdoc' as districtname, 'R-16 Reynolds' as regionname, 'C-Soutn' as companyname from dual
, pivoted as
select storenbr
, plu
, max(descrip) as Descrip
, max(decode(dd.weeknbr, 1, sold , 0)) as Week1Sold
, max(decode(dd.weeknbr, 1, total , 0)) as Week1total
, max(decode(dd.weeknbr, 2, sold , 0)) as Week2Sold
, max(decode(dd.weeknbr, 2, total , 0)) as Week2total
, max(decode(dd.weeknbr, 3, sold , 0)) as Week3Sold
, max(decode(dd.weeknbr, 3, total , 0)) as Week3total
, max(decode(dd.weeknbr, 4, sold , 0)) as Week4Sold
, max(decode(dd.weeknbr, 4, total , 0)) as Week4total
, max(decode(dd.weeknbr, 5, sold , 0)) as Week5Sold
, max(decode(dd.weeknbr, 5, total , 0)) as Week5total
from dummydata dd
group by storenbr, plu
order by storenbr, plu
select decode(grouping(companyname), 0, companyname, 'GRAND') as companyname
, decode(grouping(regionname), 0, regionname, decode(grouping(companyname), 0, companyname, 'GRAND')) as regionname
, decode(grouping(districtname), 0, districtname, decode(grouping(regionname), 0, regionname, decode(grouping(companyname), 0, companyname, 'GRAND'))) as districtname
, decode(grouping(stores.storenbr), 0, stores.storenbr, decode(grouping(districtname), 0, districtname, decode(grouping(regionname), 0, regionname, decode(grouping(companyname), 0, companyname, 'GRAND')))) as storenbr
, decode(grouping(plu), 0, plu, decode(grouping(districtname), 0, 'DISTRICT-PLU', decode(grouping(regionname), 0, 'REGION-PLU', decode(grouping(companyname), 0, 'COMPANY', 'GRAND')))) as plu
, decode(grouping(plu), 0, max(descrip), 'TOTALS') as description
, sum(Week1Sold) as Week1Sold
, sum(Week1total) as Week1total
, sum(Week2Sold) as Week2Sold
, sum(Week2total) as Week2total
, sum(Week3Sold) as Week3Sold
, sum(Week3total) as Week3total
, sum(Week4Sold) as Week4Sold
, sum(Week4total) as Week4total
, sum(Week5Sold) as Week5Sold
, sum(Week5total) as Week5total
from pivoted pvt
inner join store_details stores on pvt.storenbr = stores.storenbr
group by rollup (companyname, regionname, districtname, stores.storenbr, PLU )
COMPANYNAME REGIONNAME DISTRICTNAME STORENBR PLU DESCRIPTION WEEK1SOLD WEEK1TOTAL WEEK2SOLD WEEK2TOTAL WEEK3SOLD WEEK3TOTAL WEEK4SOLD WEEK4TOTAL WEEK5SOLD WEEK5TOTAL
C-Soutn R-16 Reynolds Murdoc 6504 40 tomato 18 100 28 100 0 0 0 0 0 0
C-Soutn R-16 Reynolds Murdoc 6504 50 bacon 89 100 99 100 0 0 0 0 0 0
C-Soutn R-16 Reynolds Murdoc 6504 DISTRICT-PLU TOTALS 107 200 127 200 0 0 0 0 0 0
C-Soutn R-16 Reynolds Murdoc Murdoc DISTRICT-PLU TOTALS 107 200 127 200 0 0 0 0 0 0
C-Soutn R-16 Reynolds R-16 Reynolds R-16 Reynolds REGION-PLU TOTALS 107 200 127 200 0 0 0 0 0 0
C-Soutn C-Soutn C-Soutn C-Soutn COMPANY TOTALS 107 200 127 200 0 0 0 0 0 0
C-Atlantic R-15 James Dunley 0277 40 tomato 16 100 26 100 0 0 0 0 0 0
C-Atlantic R-15 James Dunley 0277 50 bacon 87 100 97 100 0 0 0 0 0 0
C-Atlantic R-15 James Dunley 0277 DISTRICT-PLU TOTALS 103 200 123 200 0 0 0 0 0 0
C-Atlantic R-15 James Dunley Dunley DISTRICT-PLU TOTALS 103 200 123 200 0 0 0 0 0 0
C-Atlantic R-15 James Bingham 0177 40 tomato 16 100 26 100 0 0 0 0 0 0
C-Atlantic R-15 James Bingham 0177 50 bacon 87 100 97 100 0 0 0 0 0 0
C-Atlantic R-15 James Bingham 0177 DISTRICT-PLU TOTALS 103 200 123 200 0 0 0 0 0 0
C-Atlantic R-15 James Bingham Bingham DISTRICT-PLU TOTALS 103 200 123 200 0 0 0 0 0 0
C-Atlantic R-15 James R-15 James R-15 James REGION-PLU TOTALS 206 400 246 400 0 0 0 0 0 0
C-Atlantic C-Atlantic C-Atlantic C-Atlantic COMPANY TOTALS 206 400 246 400 0 0 0 0 0 0
GRAND GRAND GRAND GRAND GRAND TOTALS 313 600 373 600 0 0 0 0 0 0 ;
Gotcha. What about the variable number of columns based on the number of weeks in a period?
When I removed and renamed some columns, I saw that the PLU is at the bottom of the rollup, not the storenbr.
= The PLU's rollup to the storebnr, and then storenbr to district. Thanks.
Someone might learn a cool technique by looking at new code. See note below.
WITH dummydata AS
SELECT 'Store1' AS storenbr, 2 AS period, 1 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 16 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store1' AS storenbr, 2 AS period, 1 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 87 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store1' AS storenbr, 2 AS period, 2 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 26 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store1' AS storenbr, 2 AS period, 2 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 97 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store2' AS storenbr, 2 AS period, 1 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 16 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store2' AS storenbr, 2 AS period, 1 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 87 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store2' AS storenbr, 2 AS period, 2 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 26 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store2' AS storenbr, 2 AS period, 2 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 97 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store3' AS storenbr, 2 AS period, 1 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 18 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store3' AS storenbr, 2 AS period, 1 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 89 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store3' AS storenbr, 2 AS period, 2 AS weeknbr, '40' AS PLU, 'tomato' as descrip, 28 AS used, 100 AS wasted from dual UNION ALL
SELECT 'Store3' AS storenbr, 2 AS period, 2 AS weeknbr, '50' AS PLU, 'bacon' as descrip, 99 AS used, 100 AS wasted from dual
, store_details as
SELECT 'Store3' AS storenbr, 'D-Bingham' as districtname, 'R-15 James' as regionname, 'C-Atlantic' as companyname from dual UNION ALL
SELECT 'Store2' AS storenbr, 'D-Dunley' as districtname, 'R-15 James' as regionname, 'C-Atlantic' as companyname from dual UNION ALL
SELECT 'Store1' AS storenbr, 'D-Murdoc' as districtname, 'R-16 Reynolds' as regionname, 'C-Soutn' as companyname from dual
, pivoted as
select storenbr
, plu
, max(descrip) as Descrip
, max(decode(dd.weeknbr, 1, used , 0)) as Week1used
, max(decode(dd.weeknbr, 1, wasted , 0)) as Week1wasted
, max(decode(dd.weeknbr, 2, used , 0)) as Week2used
, max(decode(dd.weeknbr, 2, wasted , 0)) as Week2wasted
, max(decode(dd.weeknbr, 3, used , 0)) as Week3used
, max(decode(dd.weeknbr, 3, wasted , 0)) as Week3wasted
, max(decode(dd.weeknbr, 4, used , 0)) as Week4used
, max(decode(dd.weeknbr, 4, wasted , 0)) as Week4wasted
, max(decode(dd.weeknbr, 5, used , 0)) as Week5used
, max(decode(dd.weeknbr, 5, wasted , 0)) as Week5wasted
from dummydata dd
group by storenbr, plu
order by storenbr, plu
select decode(grouping(stores.storenbr), 0, stores.storenbr, decode(grouping(districtname), 0, districtname, decode(grouping(regionname), 0, regionname, decode(grouping(companyname), 0, companyname, 'GRAND')))) as storenbr
, decode(grouping(descrip), 0, descrip, 'TOTAL') as descrip
--== I substited Description for clarity
, sum(Week1used) as Week1used
, sum(Week1wasted) as Week1wasted
, sum(Week2used) as Week2used
, sum(Week2wasted) as Week2wasted
, sum(Week3used) as Week3used
, sum(Week3wasted) as Week3wasted
, sum(Week4used) as Week4used
, sum(Week4wasted) as Week4wasted
, sum(Week5used) as Week5used
, sum(Week5wasted) as Week5wasted
, companyname
from pivoted pvt
inner join store_details stores on pvt.storenbr = stores.storenbr
group by companyname
, rollup ( regionname
, districtname
, stores.storenbr
, descrip
;New output:
STORENBR DESCRIP WEEK1USED WEEK1WASTED WEEK2USED WEEK2WASTED WEEK3USED WEEK3WASTED WEEK4USED WEEK4WASTED WEEK5USED WEEK5WASTED COMPANYNAME
Store1 bacon 87 100 97 100 0 0 0 0 0 0 C-Soutn
Store1 tomato 16 100 26 100 0 0 0 0 0 0 C-Soutn
Store1 TOTAL 103 200 123 200 0 0 0 0 0 0 C-Soutn
D-Murdoc TOTAL 103 200 123 200 0 0 0 0 0 0 C-Soutn
R-16 Reynolds TOTAL 103 200 123 200 0 0 0 0 0 0 C-Soutn
C-Soutn TOTAL 103 200 123 200 0 0 0 0 0 0 C-Soutn
Store2 bacon 87 100 97 100 0 0 0 0 0 0 C-Atlantic
Store2 tomato 16 100 26 100 0 0 0 0 0 0 C-Atlantic
Store2 TOTAL 103 200 123 200 0 0 0 0 0 0 C-Atlantic
D-Dunley TOTAL 103 200 123 200 0 0 0 0 0 0 C-Atlantic
Store3 bacon 89 100 99 100 0 0 0 0 0 0 C-Atlantic
Store3 tomato 18 100 28 100 0 0 0 0 0 0 C-Atlantic
Store3 TOTAL 107 200 127 200 0 0 0 0 0 0 C-Atlantic
D-Bingham TOTAL 107 200 127 200 0 0 0 0 0 0 C-Atlantic
R-15 James TOTAL 210 400 250 400 0 0 0 0 0 0 C-Atlantic
C-Atlantic TOTAL 210 400 250 400 0 0 0 0 0 0 C-Atlantic the trick I used here to avoid individual rollup columns that become null on the rollup.
I used the GROUPING Function and DECODE statement to let my storenbr column reflect the rollup level. The DECODE tells the query to use the value in the column in the level up
instead of outputing NULL. The GROUPING function tells the query when the rollup occurs. See the storenbr column is never blank.
There is no rollup on companyname, so no need to place in rollup clause.
Feel free to offer better worded explanation.
Similar Messages
-
Getting extra rows in 2lis_02_hdr extraction
Hi Gurus,
Facing an issue and requesting your help ..
When I am building setup tables for Purchasing conntent, I am ending up with multiple rows for the same PO in 2lis_02_hdr in RSA3. I have deleted the older entries and done all other required stuff. However somehow the numbers not look alright to me. Attaching a screenshot from RSA3, this is for one PO, and there are multiple request date/posting date. Am I missing something here?
Thanks in advance.
DebHello Debajyoti,
You can expect multiple entries for same Purchase doc in setup tables. The reason is that the same document was changed/cancelled many times during a particular time frame.
You can know this by the value of ROCANCEL. In your screenshot the ROCANCEL is changing from ' ' to 'X' and then back to ' '. If you go to the base table EKPO you can check the code for status of records. (ideally the Trans. PD) you will know that the same document is rejected and released multiple times.
Below is the example where the same record is present multiple times with rejected and changed values in the same extractor.
Please take a look at the ROCANCEL mechanism and you will understand why it is happening.
Thanks
Amit -
Why do I get extra characters in unix terminal scripts?
I occasionally use the unix "script" function to save terminal sessions to a text file. I've noticed that if I save man pages, I get repeated characters throughout the text file. Here is an example:
Joes-MacBook-Pro:~ joe$ script ~/Desktop/ls_manpage.txt
Script started, output file is /Users/joe/Desktop/ls_manpage.txt
Joes-MacBook-Pro:~ joe$ man ls | cat
LS(1) BSD General Commands Manual LS(1)
NAME
ls -- list directory contents
SYNOPSIS
ls [-ABCFGHLPRTWZabcdefghiklmnopqrstuwx1] [file ...]
DESCRIPTION
For each operand that names a file of a type other than directory, ls
[etc.]
When I open the text file in Textwranger, it looks like this:
Script started on Fri Nov 9 11:05:02 2007
Joes-MacBook-Pro:~ joe$ ls man ls | cat
LS(1) BSD General Commands Manual LS(1)
NNAAMMEE
llss -- list directory contents
SSYYNNOOPPSSIISS
llss [--AABBCCFFGGHHLLPPRRTTWWZZaabbccddeeffgghhiikkllmmnnooppqqrrssttuuwwxx11] [f_i_le ._..]
DDEESSCCRRIIPPTTIIOONN
[etc.]
Can anyone explain where the extra characters are coming from?Interesting. I tried to duplicate your results and I find that script doesn't work at all for me under 10.4.10. I just get an empty file, except for the last line that tells me "Script done on (date)".
If you look at your script output using od -c you'll find that there are even more extra characters.
NNAAMMEE
... has back spaces embedded ...
N^HNA^HAM^HME^HE
... because this how ancient printers did bold face and underlining. -
Export to Excel - Problem with extra rows
Hi have a report that has 3 groups. I suppress the group headers and am using the group footers for totals.
When I export to excel, I get extra rows in the excel file for the suppressed sections. How can I get rid of these?
Thanks,
LindaI can use this to get out additional rows on my excel export. However, in the columns, I usually put some distance between each column so the columns won't run together. This is giving me extra columns. It would be much easier if I did not have to put that distance. Is there a way to format the field to have a leading or trailing space so all the fields don't run together on the report?
example:
field1
field2
field 3
if all these fields have data the output would look like:
field1datafield2datafield3data
how can I make it look like:
field1data field2data field3data -
Why do i get 2 curves and not just 1 when i create a diagram from a row of data in a table ?
Why do I get 2 curves and not just i when I create a diagram from a row af data in a table ?
Erik,
Thank you for giving me the points. Generally you wait to award points until your problem is solved. It is totally your at your descretion.
OK.
This is still not clear. To post a screenshot get the "stuff" you want to show in view on your screen, then type the key combination <Command>+<Shift>+3. The cursor will change to a crosshair. Click and hold on the top-left corner, then drag to enclose what you want to show (to the bottom-right corner), then release. The screenshot will appear on your desktop and will be named something like "".
Now click the camera icon in the tool bar for this forum:
, click the text box to allow you to navigate to, and select your screenshot.
Here is what you sent me:
The graph does not seem to be associated with the table of data you are showing. Generally when you highlight a graph the corresponding table will highlight and show the source of each of the series in the graph (dark and light blue).
This is what I would expect to see when highlighting a graph:
Right now I think there is ANOTHER table arround that is the source for the graph and the table you show is "just another table". You can move your data into the table the graph refers to by copy and paste, or simply typing the values. You can change how many series there are by grabbing the little circle at the bottom right of the highlighted cells (when you have the graph highlighted) and dragging as shown:
The Numbers Users' Guide is a great resource you should utilize and can be found here:
http://support.apple.com/manuals#macosandsoftware
The chapter on graphing (or charting) is 7 and starts on page 134. -
Why am i getting rows which are equal?
Hi All,
why am I getting the values which are equal(highlighted in bold letters) even though I have a greater than condition(bold letters) in the where clause of the below query?
select name1, name2,
length(ltrim(rtrim(name2))) length_unit,length(ltrim(rtrim(name1))) length_name1 from ucbprem
where ltrim(rtrim(name1)) != ltrim(rtrim(name2))
and length(ltrim(rtrim(name2))) > length(ltrim(rtrim(name1)))
and instr(ltrim(rtrim(name2)),' ') !=0
and substr(ltrim(rtrim(name2)),1,instr(name2,' ')-1) = ltrim(rtrim(name1)) OR substr(ltrim(rtrim(name2)),1,instr(name2,' ')-1) = substr(ltrim(rtrim(name1)),1,2)
order by name1, name2;
name1 name2 length_name2 length_name1
BLDG BLDG F 6 4
BLDG BLDG G 6 4
BLDG BLDG H 6 4
BLDG BLDG H 6 4
BLDG BLDG I 6 4
BLDG BLDG J 6 4
BLDG BLDG R 6 4
BLDG BLDG W 6 4
FRNT FR 2 4 4
FRNT FR A 4 4
LOWR LO A 4 4
REAR RE 2 4 4
REAR RE 2 4 4
REAR RE A 4 4
REAR RE B 4 4
REAR RE B 4 4
REAR RE C 4 4
REAR RE D 4 4
UPPR UP 2M 5 4
Any idea?
Thanks in advance
R.ROR substr(ltrim(rtrim(name2)),1,instr(name2,' ')-1) = substr(ltrim(rtrim(name1)),1,2)
SQL> conn scott/tiger
Connected.
SQL> create table trimm (name1 varchar2(4), name2 varchar2(4));
Table created.
SQL> insert into trimm values ('FRNT', 'FR 2');
1 row created.
SQL> select * from trimm
2 where substr(ltrim(rtrim(name2)),1,instr(name2,' ')-1) = substr(ltrim(rtrim(name1)),1,2);
NAME NAME
FRNT FR 2Message was edited by:
stevencallan -
I am playing candy crush and can purchase hammers etc but when I try to get extra lives I am told to go to apple support ..cannot finish my purchase.
To Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
after I load a object into data grid created from a web
service it will always seem to create a new blank row. When I get a
error after clicking on it, it always says "-1" for the rows count.
when I shrink the size of the datagrid it elminates some of the
extra row, but still there is a bit of it showing. how do I resize
the datagrid so it doesn't spit out a extra row, or a part of one.
http://www.ctrlzsc.com/other/pic.png
this is a pic showing the extra row, just look where my badly drawn
arrow is pointing to.hi, xyco45
you can set the dataGrid's height and the rowHeight. In my
experience, for example, first, you set the headerHeight="25" and
rowHeight="22", the height will be setted
(headerHeight+rowHeight*(rowNumbers)+1) or
(headerHeight+rowHeight*(rowNumbers)+2), I thought this question
will be solved. -
Why do I have extra songs in my iPhone playlist that are not on my iTunes library?
After doing the iOS7 update (and iOS7.0.2) I decided to add my music to my phone (I never had music on it before).
I discovered that there were 20 very random and obscure broadway songs that were on my iPhone in addition to the 60 songs I just synced. They had the iCloud icon by them, unlike the songs I had just added.
After doing research I found that the broadway songs were technically "purchased" on iTunes although they are not songs I would have ever purchased- in fact I have never once purchased anything on iTunes. This isn't my worry though, I am assuming it must have been some random free download I did at some point?
I went to settings > music > and turned show all music off. This did NOT work for all of them and only solved the problem 80%. There are still 4 of the random song on my iPhone. They DO NOT show up in my iTunes library on my computer and don't even exist on my computer.
With the other songs I can left swip and delete but these 4 songs won't! Why won't these four songs left swipe?
I am going crazy and have tried restarting my phone, restarting iTunes, re-syncing, turning off the iCloud. NOTHING WORKS.
Please help. I am a normally a very smart and tech-savvy person and I cannot for the life of me figure this out. I don't want to wipe everything- which as a solution is a pretty weak solution.
Why won't certain songs left swipe to delete off my phone when I am in the music app?
Why do I have extra songs on my phone that don't appear on iTunes on my computer?
Where did these songs come from and how do I get rid of them?
Much thanks!I had the exact same issue!! Seriously p*ssed me off when I checked out my ITunes purchased items (via my computer) and noticed that most of the additional tracks listed on my IPhone playlist was listed there too. However, I never authorized any purchases!! (I have actually written Apple Support asking for a full refund of all tracks listed on my purchased list)
Be careful when you swipe your finger to the left/right on those "additional" tracks on your IPhone playlist... I'm pretty sure that the cloud symbol is an option to download or automatically buy those tracks.
Solution for the problem:
1 - go to your IPhone settings
2 - choose "iTunes & App Store"
3 - go to "Show All" & "Music"
4 - turn off "Music" by moving the bar to the left (it should be a white color once you turn it off)
Should solve your problem :~) -
Any way to get Front Row to show video playlists such as TV shows?
I can get AppleTV now to show the TV show playlists in iTunes as their own menu items. However, I can't seem to get Front Row in 10.6 to do the same thing.
I currently have iTunes 8.2.1 in 10.6.0. Is this something either upgrading to 10.6.1 or iTunes 9 will enable?Front Row users have been waiting for this option since video playlists first appeared in iTunes quite some time ago. Unfortunately, I've never been able to make it work. Why Apple can't enable what seems like a simple options is beyond me. My iPod nano can do it but Front Row on my Mac can't. I'd advise you to send Apple some Mac OS X feedback since there's no specific form for Front Row itself:
http://www.apple.com/feedback/macosx.html
-Doug -
Hi list,
does any one know how I can get the row number the same as what I have in column rowno?
thanks
Arvin
REATE TABLE dbo.temptable
( y int NOT NULL,
e int not null,
c int not null,
rowno int not null)
/* insert values */
INSERT INTO dbo.temptable(y,e,c,rowno ) VALUES
(1,1,1,1),
(1,1,2,1),
(1,1,3,1),
(1,20,1,2),
(1,20,2,2),
(1,20,3,2),
(1,3,1,3),
(1,3,1,3),
(2,1,1,1),
(2,1,1,1),
(2,2,1,2),
(2,2,1,2);You may update your rownumber column with Column "e".
But why do you duplicate your data? May be there is no particular reason, you may be wasting space for it
Try the below:
CREATE TABLE dbo.temptable
( y int NOT NULL,
e int not null,
c int not null,
ronum int null)
INSERT INTO dbo.temptable(y,e,c ) VALUES
(1,1,1),
(1,1,2),
(1,1,3),
(1,20,1),
(1,20,2)
select * from temptable
update dbo.temptable Set ronum=e
Select * From dbo.temptable
DRop table dbo.temptable -
How to manually insert an extra row of data in to a record set
hi there, i have a standard query which gets me some rows of
data
is there a way to manually add in an extra row of data (an
position that as row number 1 in the recordset)?
i've tried to find something on this in google / live docs -
but alas to no avail
if anyone could give me a pointer in the right direction
(just a tag would be a help) i'd be very grateful indeed.
thanks very muchthank you very much for your replies, this "union query"
sounds like the way forward for me - thank you very much i shall go
and investiage this now.
the reason i was a bit slow in replying was that in interim i
had coded around my problem
<cfif recordset.currentrow eq 1>
#output the extra row i wanted to add here#
</cfif>
which, whilst being a bit crude did do the job - however i
will check out this union query and if that does what it sounds
like it will - i'll document my final solution here in case this
helps anyone else
thanks again for your help guys -
SQL*Plus two fetches for getting one row.
Hi all.
I have tested following script.
alter session set events '10046 trace name context forever, level 12';
select * from dual;And achieved such results (extract from .trc file).
SQL*Plus: Release 11.2.0.1.0; (Oracle Version 10.2.0.4.0, 11.2.0.1.0)
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 0 0 1
total 4 0.00 0.00 0 0 0 1SQL*Plus: Release 8.1.7.0.0; (Oracle Version 8.1.7.0.0)
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 1 4 1
total 5 0.00 0.00 0 1 4 1Allround Automations PL/SQL Developer 8.0.4; (Oracle Version 10.2.0.4.0, 11.2.0.1.0)
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 0 0 1
total 3 0.00 0.00 0 0 0 1Allround Automations PL/SQL Developer 8.0.4; (Oracle Version 8.1.7.0.0)
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 1 4 1
total 3 0.00 0.00 0 1 4 11) I can't figure out why sqlplus does TWO fetches for getting ONE row (instead of pl/sql developer).
8i raw trace
PARSING IN CURSOR #1 len=31 dep=0 uid=0 oct=3 lid=0 tim=0 hv=3549852361 ad='4a0155c'
select 'hello world' from dual
END OF STMT
PARSE #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=0
BINDS #1:
EXEC #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=0
WAIT #1: nam='SQL*Net message to client' ela= 0 p1=1111838976 p2=1 p3=0
FETCH #1:c=0,e=0,p=0,cr=1,cu=4,mis=0,r=1,dep=0,og=4,tim=0
WAIT #1: nam='SQL*Net message from client' ela= 0 p1=1111838976 p2=1 p3=0
FETCH #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=0
WAIT #1: nam='SQL*Net message to client' ela= 0 p1=1111838976 p2=1 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 0 p1=1111838976 p2=1 p3=0
STAT #1 id=1 cnt=1 pid=0 pos=0 obj=195 op='TABLE ACCESS FULL DUAL '11g raw trace
PARSING IN CURSOR #3 len=30 dep=0 uid=96 oct=3 lid=96 tim=1581355246985 hv=1158622143 ad='b8a1bcdc' sqlid='5h2yvx92hyaxz'
select 'hello world' from dual
END OF STMT
PARSE #3:c=0,e=130,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1388734953,tim=1581355246984
EXEC #3:c=0,e=40,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1388734953,tim=1581355247154
WAIT #3: nam='SQL*Net message to client' ela= 7 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=1581355247252
FETCH #3:c=0,e=18,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=1388734953,tim=1581355247324
STAT #3 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
WAIT #3: nam='SQL*Net message from client' ela= 193 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=1581355247735
FETCH #3:c=0,e=2,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,plh=1388734953,tim=1581355247800
WAIT #3: nam='SQL*Net message to client' ela= 5 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=15813552478552) Is there any possibility to view data provided by each fetch?
Thanks in advance!
P.S.
SQL> sho arraysize
arraysize 15Thanks.
I have tested two statements.
select 'hello world' from dual where 1=1;
select 'hello world' from dual where 1=0;When query returns no data, there is only one SQL*Net roundtrip (and one fetch)
SQL> set autot on statistics
SQL> select 'hello world' from dual where 1=1;
'HELLOWORLD
hello world
Statistics
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
528 bytes sent via SQL*Net to client
492 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL> select 'hello world' from dual where 1=0;
no rows selected
Statistics
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
329 bytes sent via SQL*Net to client
481 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processedBut in both cases i found in client trace this sequence of bytes:
] nsprecv: 00 00 36 01 00 00 00 00 |..6.....|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 90 19 43 13 00 00 |....C...|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 00 00 00 00 00 00 |........|
] nsprecv: 00 00 19 4F 52 41 2D 30 |...ORA-0|
] nsprecv: 31 34 30 33 3A 20 6E 6F |1403:.no|
] nsprecv: 20 64 61 74 61 20 66 6F |.data.fo|
] nsprecv: 75 6E 64 0A |und. |In first case - it was in 2nd packet and in second case (query returns no data) - part of 1st packet. -
Select extra row without using UNION ALL in pl/sql
Hi,
Can anyone tell me how to select extra row without using UNION or UNION ALL in pl/sql. Actually I want to have my o/p of query as partitioned by designation and ordered by salary and than one extra row which will contain the highest salary in a particular salary. My table has first_name,emp_id,designation and salary column. And I wnt the o/p as.
Mohinish,12212,SI,46000
Ram,11212,SSI,47000
Shyam,12133,SI,48000
Rick,9898,SI,46000
Rocky,12312,SSI,56000
Sariq,23948,SI,43000
Suman,12789,HR,49000
Sampy,12780,SI,46000
Parna,11111,HR,50000
Now the o/p should be.
Mohinish,12212,SI,46000
Rick,9898,SI,46000
Sariq,23948,SI,43000
Shyam,12133,SI,48000
Shyam,12133,SI,48000
Ram,11212,SSI,47000
Rocky,12312,SSI,56000
Rocky,12312,SSI,56000
Suman,12789,HR,49000
Parna,11111,HR,50000
Parna,11111,HR,50000
Thanks in AdvanceYou don't have to do a UNION or UNION ALL in PL/SQL but you would need to in SQL to get the desired output:
with data_recs
as (select 'Mohinish' first_name,12212 emp_id,'SI' designation,46000 salary from dual union
select 'Ram',11212,'SSI',47000 from dual union
select 'Shyam',12133,'SI',48000 from dual union
select 'Rick',9898,'SI',46000 from dual union
select 'Rocky',12312,'SSI',56000 from dual union
select 'Sariq',23948,'SI',43000 from dual union
select 'Suman',12789,'HR',49000 from dual union
select 'Sampy',12780,'SI',46000 from dual union
select 'Parna',11111,'HR',50000 from dual)
select first_name, emp_id, designation, salary from data_recs union all
select s.first_name, s.emp_id, s.designation, s.salary
from (select first_name,
emp_id,
designation,
salary,
row_number() over (partition by designation order by salary desc) high_salary
from data_recs
order by designation, salary) s
where s.high_salary = 1
order by designation, salary;
FIRST_NAME EMP_ID DESIGNATION SALARY
Suman 12789 HR 49000
Parna 11111 HR 50000
Parna 11111 HR 50000
Sariq 23948 SI 43000
Rick 9898 SI 46000
Mohinish 12212 SI 46000
Sampy 12780 SI 46000
Shyam 12133 SI 48000
Shyam 12133 SI 48000
Ram 11212 SSI 47000
Rocky 12312 SSI 56000
Rocky 12312 SSI 56000 -
Extra row in Ready input query.
Hi gurus,
I have developed a Ready input query and its working fine but in the report i mean after the over all Result row at the end there should be extra row get added by default for entering the data iam not getting the extra row for entering the Data. How to bring that extra row please suggest accordingly
RegardsIn analyzer, check that Analysis Grid property 'Suppress New Lines' is unchecked.
Also, check this link http://help.sap.com/SAPHELP_NW70/helpdata/EN/43/f234619e3c4c5de10000000a155369/frameset.htm
It explains the prerequisites for new input-ready rows for BEx Analzer as well as WAD.
Maybe you are looking for
-
Creating views in Physical Layer of OBIEE Administration Tool
Hello, I am doing a proof of concept of creating an OBIEE repository using the Administration Tool to make a model for an in house sandbox OLTP system. Because this POC isn't using a warehouse that is built nicely with everything I need, I am having
-
Acrobat 8 Standard Frequent Crashing / Not Updating
Hi. My Adobe Acrobat 8 Standard v 8.1.6 is having some problems. I do a lot of work in Acrobat and I can normally deal with the occasional hiccups, such as restarting Acrobat, but lately things have regressed considerably. I've run the Repair tool bu
-
Cannot reference from static content
Ok, so I was working on wrapping the main program and the classes together and I come up with that error...TopSort.java:40: non-static method addVertex(java.lang.String) cannot be referenced from a static context. I know why I am getting the error, I
-
I have been putting my credits at the end of each film. SO far all is well. However, for one of my films, I copy the same credits but am having problems. The end of the credits play first even though when you open up the title roll/crawl it shows the
-
Hi guys, Is it possible to display both GL short text and GL long text while performing transactions. Normally the long text is only displayed. Is it also possible to display the short text. Thanks, Srikanth.