SQL & PL/SQL :: Format Horizontal UNION
Mar 5, 2013
select to_char(sysdate, 'mm/dd/yyy') "DATE", to_char(sysdate, 'HH24:MI AM') "TIME", sum(bytes)/1024/1024/1024 "TOTAL_GB"
from dba_data_files
UNION ALL
select to_char(sysdate, 'mm/dd/yyy') "DATE", to_char(sysdate, 'HH24:MI AM') "TIME", sum(bytes)/1024/1024/1024 "USED_GB"
from dba_segments
[/HTML]
I like to get the output from the queries above.
DATE TIME TOTAL_GB USED_GB %USED
3/5/2013 06:00 AM 3151.24316 2330.40381 73.95
3/5/2013 12:00 PM 3151.24316 2347.41551 74.49
3/5/2013 06:00 PM 3151.24316 2349.76498 74.56
.....
[/HTML]
how I can format.
View 4 Replies
ADVERTISEMENT
Apr 22, 2010
Is it better to use UNION (or) UNION ALL with DISTINCT,Which one will improve performance.
Query1:
SELECT deptno FROM emp
UNION
SELECT deptno FROM dept
Query2:
SELECT DISTINCT * FROM(SELECT deptno FROM emp
UNION ALL
SELECT deptno FROM dept)
I mean to say query1 is better (or) query2 is better,which query improves the performance.
View 1 Replies
View Related
Mar 4, 2013
how should i do to make horizontal partitioning?
View 18 Replies
View Related
Aug 28, 2013
get the horizontal scroll bar as shown in the attached pdf.
The first screenshot in attached pdf shows how my form look like, it is having more then 30 columns. And i want a scroll bar as shown in second screenshot in attached pdf.
View 2 Replies
View Related
Apr 16, 2012
I have a tab canvas with 4 tab pages.I want to set scroll bars for each tab page. I draw 4 stack canvas on 4 tab page but it doesn't transferred fields in each tab pages.
View 4 Replies
View Related
Aug 18, 2010
I need to build a query on making a vertical records to horizontal records. I did read somewhere saying that we can use decode function. But im still trying to understand how decode function can make a vertical records to horizontal records.
View 4 Replies
View Related
Apr 21, 2010
I have a table like the
WEEK STORE SALES
1 A 12
2 A 18
3 A 20
4 A 25
I need a query to build out put like
store week1 week2 week3 week4
A 12 18 20 25
View 4 Replies
View Related
Dec 20, 2012
I'm trying to create a report in the following format
Year Name Reg1 Reg2 Reg3
2001 Al 3 4 5
2001 Le 4 1 1
2001 7 5 6
2002 Sue 2 4 1
2002 Al 1 3 6
2002 Jim 6 1 3
2002 16 15 16
2003 Jim 4 -3 2
2003 Le -2 4 5
2003 20 16 23
Note that the totals are accumulating horizontally, broken on year.
View 3 Replies
View Related
Sep 8, 2012
I need to display the sql query output in horizontal manner. Below I have given the script.
create table TestTable (id number, name varchar2(10))
insert into TestTable values (1, 'John')
insert into TestTable values (2, 'Mckensy')
insert into TestTable values (3, 'Valneech')
insert into TestTable values (4, 'Zeebra')
[code]....
But for my requirement, I need to display in horizontal manner.
ID 1 2 3 4
Name John Mckensy Valneech Zeebra
View 3 Replies
View Related
Aug 20, 2011
i need to create a form with 15 col and 10 records in tabular format to display records from the table....i done it with vertical scroll bar ..bt.i need both horizontal and vertical scroll bar for that tabular.
View 2 Replies
View Related
Feb 28, 2012
I want to do horizontal fragmentation of a table say employee. But fragmentation is often related to distributed databases. So i want to ask how can i do this on my single home computer? list out the steps that should be performed. I saw the concept of link but really failed to understand that.
View 14 Replies
View Related
Aug 14, 2012
Is there anyway to show calendar month dates in horizontal line?
First line will have dates and then second line will have day i.e Sat, Sun, Mon.......
1 2 3 4 5 6 7 8 9 ........31
View 12 Replies
View Related
May 11, 2011
i just try example in URL.....but i try it in oracle 10g, it about horizontal scroll bar in stacked canvas , where emp information ,employee has been split into two part ename,empno ,will be in a frame and other info will be in stacked canvas in same frame ,i just try same thing as say in website , but information in content canvas is not visible in tried but it is not coming..
View 4 Replies
View Related
Dec 16, 2012
I want to implement Horizontal accordion... I've found a good example @ the following location
[URL]..........
but can't seems to follow the first step to Download easyaccordion.zip file and upload to the #IMAGE_PREFIX#libraries..
I am using APEX.ORACLE.COM environment.
View 3 Replies
View Related
Mar 4, 2013
I am using APEX 4.0, my regions need to be displayed at "Display Point: Display Template Body 2" in column 2.I have 2 regions I want displayed horizontally, side by side.I want to use a parent region to contain them. I create my parent region, called it A, template = Reports, assign it to sequence = 10.I create my 2 sub region (B) and (C), sequence 20 and 30, template = Navigation, picking parent = A.By default, B displays above C. URL....
I copied the Navigation template, creating a new one called NAV2 and added this in the sub-region template section:(this cut/paste) doesnt display well here: it is the exact DIV begin/end block as posted above.
div style="float: left;"
#SUB_REGION#
div
I changed regions (B) and (C) to use template = NAV2, without any change in display behavior.I read further in the above post where it was recommended to reset the clear property, so I changed the above style like to: style="float: left;clear:none;".
View 5 Replies
View Related
Oct 25, 2010
How to create horizontal and vertical scrollbar at a time while design mode??
View 2 Replies
View Related
Jun 25, 2013
I have a requirement of pulling the data from a field in horizontal form of Advanced Supply Chain Planning responsibility(ASCP). When I go into help-> Diagnostics, it shows the block name of the form as 'Horizontal Plan' and field name as 'Pivot Table'. Not pretty sure on how to pull the data source into horizontal form with the info I have.
View 3 Replies
View Related
Oct 24, 2012
I've edited the XML on the Chart Attributes page but I don't find atrtributes to rotate the y-axis title (<text>TITLE</text>) nor the letters themselves in the title. What I'd like is something very close to
T
I
T
L
E
But what I get is a horizontal title rotated -90 degrees. I've looked at lots of Anychart documentation but don't find anything that seems to fit with the XML already given on the Chart Attributes page. I've seen the "rotate" attribute but I don't know where it would go and even then, I'm sure it only rotates the title as a unit and not the individual letters.
View 0 Replies
View Related
Sep 13, 2012
I want to create a news ticker to scroll the images horizontal at the bottom of the page.
I tried with the text content its working fine but and coming to the images its not working.
how to use the workspace images into the news ticker.
View 5 Replies
View Related
Nov 12, 2012
is there any difference between
- returning from the procedure 2 ref cursors containing result set of 2 queries
- returning from the procedure 1 ref cursor containing result set of that 2 queries as one (with UNION ALL)?
Will 2nd option be faster or similar to 1st?
View 1 Replies
View Related
Sep 30, 2010
I have a query which has 5 unions, each clause of the union takes 1 hr to run and query results come back in 5 hrs, Is there any way I can make these clause to run in parallel?
View 13 Replies
View Related
Aug 23, 2012
I am facing an issue in union clause
Below is my query Issue faced is that based on union I want to limit the result and does not want second query to give duplicate result as both queries deal with same table
SELECT TAB1.ID, TAB1.CRNCY_CODE, TAB2.SCHEME_CODE, DECODE( 'INFENG',CAST( '' AS VARCHAR(20)),
NVL(TAB2.ALT1_SCHEME_DESC,TAB2.SCHEME_DESC),TAB2.SCHEME_DESC),
TAB1.SUB_HEAD_CODE, DECODE( 'INFENG' ,CAST( '' AS VARCHAR(20)),NVL(TAB1.ALT1_SUB_HEAD_DESC ,
TAB1.SUB_HEAD_DESC),TAB1.SUB_HEAD_DESC)
[code]...
select null ID,null crncy_code,TAB2.SCHEME_CODE ,
NVL(TAB2.ALT1_SCHEME_DESC,TAB2.SCHEME_DESC),TAB2.SCHEME_DESC,null SUB_HEAD_CODE from TAB2 where TAB2.SCHEME_TYPE ='SCHEME1';
[CODE]
View 4 Replies
View Related
Aug 17, 2011
I'm just trying to see if there is another way of doing this query without using a UNION. The only way I can see is using a UNION but maybe I'm missing something or a way to do it without a UNION.
Result:
Select any customer within the user_states table who lives in "MO"
Select any customer within the user_cars table who lives in "MO" and has a "White" car
Select any customer within the user_plates table who lives in "MO" and has a plate of "A" or "B"
Join to the user_names table to display the customers name
So, the result would be any customer who lives in "MO" who owns a "White" car and any customer who lives in "MO" who has a plate of "A" or "B".
SQL
select b.customer_id,
b.first_name,
b.last_name
[Code]....
View 4 Replies
View Related
Jun 28, 2010
I have an query i.e.
I want 3 lines input in 1 line using 2 union operator like
Input:-
'i love playing
football and
volleyball'
i want the output like:-
"i love playing football and volleyball"
solve query using 2 union operator?
View 9 Replies
View Related
Jul 1, 2010
how can i get a union of two pl/sql tables. ??
View 2 Replies
View Related
Dec 11, 2012
Cant find any artice on what is better to use unpivot or union all. I can achive same results using either but cant decide what would be better. For example a table has columns:
Name 1, Phone1, Name 2, Phone 2. The result I want would be:
Name 1, Phone 1
Name 2, Phone 2.
View 5 Replies
View Related
Aug 24, 2012
I have the following sql
select htf.escape_sc(su.sukey) a, htf.escape_sc(su.sukey) b
from udm_su su, udm_lde lde
where su.ldeid = lde.ldeid
and su.sukey in (select su_generic
[code]...
View 3 Replies
View Related
Dec 21, 2010
Is there any alternative to Union or Union all of two different table. Example would be great.
View 5 Replies
View Related
May 24, 2011
I've got function with combined sql statement (union all), how do I split it into two sql requests? This is to avoid time increasing of sql executing. IMHO good solution is to write two functions, how do you think?
FUNCTION f_LintOVRDUAH
(mydate date,
cid number )
[Code]....
View 18 Replies
View Related
Jun 5, 2012
SELECT b.KPCNO
,b.KPC_FULL_NAME
,min(c.time) in_time
FROM xxkpc_hr_personnel_v2 b
,xxkpc_fingerscan_data_v c
[code]........
View 5 Replies
View Related