Sql To Display Output In Horizontal View?

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


ADVERTISEMENT

Application Express :: Display Horizontal Sub Regions

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

SQL & PL/SQL :: Output Layout And Display Changes?

Oct 11, 2011

SQL

SELECT ug_name, rss_user_name
FROM ru_ug
WHERE rss_name = 'EXAMPLE' AND ug_name LIKE 'cn=SNG-PWI11_%'
ORDER BY ug_name

Output

UG_NAMERSS_USER_NAME
cn=SNG-PWI11_DBE_TMM,ou=Netgroup,dc=TMM,dc=netopscn=hostname55,ou=Netgroup,dc=TMM,dc=netops
cn=SNG-PWI11_DBE_TMM,ou=Netgroup,dc=TMM,dc=netopscn=hostname49,ou=Netgroup,dc=TMM,dc=netops
cn=SNG-PWI11_DBE_TMM,ou=Netgroup,dc=TMM,dc=netopscn=hostname19,ou=Netgroup,dc=TMM,dc=netops
cn=SNG-PWI11_I_TMM,ou=Netgroup,dc=TMM,dc=netopscn=hostname932,ou=Netgroup,dc=TMM,dc=netops
cn=SNG-PWI11_I_TMM,ou=Netgroup,dc=TMM,dc=netopscn=hostname56,ou=Netgroup,dc=TMM,dc=netops
cn=SNG-PWI11_I_TMM,ou=Netgroup,dc=TMM,dc=netopscn=hostname77,ou=Netgroup,dc=TMM,dc=netops

But I wish other output:

UG_NAME1 UG_NAME2
RSS_USER_NAME1 RSS_USER_NAME3
RSS_USER_NAME2

Table:

CREATE TABLE RU_UG
(
RSS_USER_NAME VARCHAR2(255 BYTE) NOT NULL,
UG_NAME VARCHAR2(255 BYTE) NOT NULL,
RSS_NAME VARCHAR2(32 BYTE) NOT NULL,
RSS_TYPE VARCHAR2(12 BYTE) NOT NULL,

[code]....

View 1 Replies View Related

SQL & PL/SQL :: Display Output IDs Which Are Having Status Both Y And N?

May 11, 2012

CREATE TABLE stud(id number,Status CHAR(1))

INSERT INTO stud values(10,'Y')
INSERT INTO stud values(10,'Y')
INSERT INTO stud values(10,'Y')
INSERT INTO stud values(10,'N')

[code]...

ID STATUS

10 Y
10 Y
10 Y
10 N
20 Y

[code]...

I want to display the out put the IDs which are having the status both 'Y' and 'N'The output should be

ID STATUS

10 Y
10 Y
10 Y
10 N
20 Y
20 N
20 N

View 12 Replies View Related

SQL & PL/SQL :: Display In List Non-Existent Value In Output

Mar 6, 2012

I am not sure if this is even possible however I will give it a try here. is there a way to take a value from an In List that doesn't exist in the table and get SQL PLus to output that value with an assigned decode construct. example.

1 select decode(count(object_name),1,'EXIST',null,'NOT EXIST',0,'NOT EXIST'),
2 object_name, object_type
3 from dba_objects where object_name in (
4 'GV_$METRICNAME',
5 'GV$METRICNAME',
6 'GV_$METRICGROUP',
7 'GV$METRICGROUP',
8 'ABC'
9 )
10* group by object_name, object_type
SQL> /

DECODE(CO OBJECT_NAME OBJECT_TYPE
--------- ------------------------- -------------------
EXIST GV_$METRICNAME VIEW
EXIST GV_$METRICGROUP VIEW
EXIST GV$METRICNAME SYNONYM
EXIST GV$METRICGROUP SYNONYM

and have it look like this:

DECODE(CO OBJECT_NAME OBJECT_TYPE
--------- ------------------------- -------------------
EXIST GV_$METRICNAME VIEW
EXIST GV_$METRICGROUP VIEW
EXIST GV$METRICNAME SYNONYM
EXIST GV$METRICGROUP SYNONYM
NOT EXIST ABC

View 4 Replies View Related

SQL & PL/SQL :: Display Output For Null Column

Jul 24, 2012

I am having following table, and below are the out put and desired output.

CREATE TABLE tbl1
(
mon VARCHAR2(10)
, grp VARCHAR2(50)
, visits NUMBER
, redirect VARCHAR(50)
)
;

[Code]....

Query:

SELECT
mon
, grp
, SUM(visits)
FROM
tbl1
WHERE
redirect IS NOT NULL
GROUP BY mon, grp
;

Output:

May-12 Green 16
May-12 Blue 20
May-12 Yellow 13

Desired Output:

May-12 Green 16
May-12 Blue 20
May-12 Yellow 13
May-12 Red 0
May-12 Orange 0

How can this be acheived?

View 1 Replies View Related

Client Tools :: Display Output In Sql

May 15, 2010

having trouble displaying stuff on screen. It compiles the program successfully but just doesnt show any output Try using this (SET SERVEROUTPUT ON SIZE 4000) does nothing though. here my code

DECLARE
/*This program coverts a date from one fomat eg 1/31/10
into another format eg January 31,2010 */
/*declaring variables
assign a date that is in one format*/
EXAMPLE_DATE DATE := TO_DATE(' 1/31/06',' MM/DD/YY' );
/*finding the position of where the forward slash are*/
position_finder NUMBER := INSTR(EXAMPLE_DATE,'/');

[Code]....

View 2 Replies View Related

PL/SQL :: Display Output Of O_store_rec Object

May 11, 2013

while compiling this pl/sql block i am getting error ora-6531 :reference to uninitialized collection.

Declare
O_error_message RTK_ERRORS.RTK_TEXT%TYPE;
O_store_rec STORE_SQL.STORE_REC;
I_message RIB_XSTOREDESC_REC;
I_message_type VARCHAR2(50);
result boolean;
Begin
O_store_rec.loc_trait_tbl := ORGANIZATION_SQL.LOC_TRAIT_TBL();
O_store_rec.walk_through_tbl := STORE_SQL.WALK_THROUGH_STORE_TBL();
[code]........

View 4 Replies View Related

SQL & PL/SQL :: Display Grid Output Using Execute Immediate Or SysRefCursor Constructs?

Mar 21, 2011

I am in a state of confusion and requires a solution for this urgently:I used to use 'Execute Immediate' statement or 'Sys_RefCursor' for forming parts of query dynamically based on user inputs and then finally execute them at runtime for updating database / saving results into a variable etc.

But as per the latest requirement, I wanted to have the resultset of such a query displayed in the grid area / results area of a database tool; say, SQL Navigator, Toad or PL/SQL developer.; just like you see the results of a normal 'SELECT * FROM TABLE1'; Is this really possible ??

see the below examples:

Eg: for Execute Immediate:

declare
vtest VARCHAR2 := NULL;
vdisplay VARCHAR2;
begin
vtest := 'SELECT FIELD_1 INTO vdisplay FROM TABLE_A';
vtest := trim(vtest) || 'WHERE FIELD_2 = ''XYZ''';
execute immediate TRIM(vtest);
dbms_output.put_line(vdisplay);
end;

---> This would display output into the 'Output' tab of the database tool / editor;

Eg: for SysRefCursor:

declare
vCur SYS_REFCURSOR;
vdisplay VARCHAR2;
begin
OPEN vCur for 'SELECT NULL' || var1 || 'WHERE FIELD_1 = ' || Value1;
FETCH vCur INTO vdisplay;
dbms_output.put_line(vdisplay);
end;

---> Even this would display output only into the 'Output' tab of the database tool / editor;

===> But my requirement is: Different from these, is there any way to get this output displayed into the normal output grid / result area of a database tool ? just like you see the results of a normal 'SELECT * FROM TABLE1' query ?

View 5 Replies View Related

How To Subdivide 1 Large TABLE Based On The Output Of A VIEW?

Aug 15, 2012

I am searching for a decent method / example code to subdivide a large table (into a global temp table (GTT) for further processing) based on a list of numeric/alphanumeric which is the resultset from a view.

I am groping with the following strategy in PL/SQL:

1 -- set up cursor, execute the view (so I have the list of identifiers)

2 -- create a second cursor (or loop?) which: accepts each of the identifiers in turn executes a query (EXECUTE IMMEDIATE?) on the larger table INSERTs (or appends?) each resultset into the GTT

3 -- Then the GTT contains just the requires subset of the larger table for further processing and eventual import into iReport for reporting.

GTT is defined and ready to go, the larger table contains approx 40,000 rows and I need to extract a dozen subsets or so which add up to approx 1000 rows.

View 10 Replies View Related

SQL & PL/SQL :: Display Time Format In Oracle By Create View

Nov 16, 2011

I am not able to find any information regarding inserting data with timestamp format without putting the date.

This is what i want to do:

ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='DD-MON-RR HH24:MI TZR';

I create the column data type as timestamp with time zone. This is value i have inserted:

Insert Into TEST Values('05-OCT-2013 01:00 +08:00','05-OCT-2013 23:00 +08:00','SCIENCE);

And now i wish to display it in 'HH24:MI TZR' only after i deduct both of the time. This is the view i have created:

Create View TESTRECRDS As Select (STARTTIME- ENDTIME)*24 As DURATION, Science;

But when i select it display as weird timing because it would default in 'DD-MON-RR HH24:MI TZR' format.

BUT IF i create the view and display as 'HH24:MI TZR', it would gives me error:

Create View TESTRECRDS As Select To_Char(STARTTIME- ENDTIME, 'HH24:MI TZR')*24 As DURATION, Science;

Error would be invalid number. How can i display only 'HH24:MI TZR' after subtracting?

View 3 Replies View Related

Application Express :: Theme 25 Content Frame - Does Not Display In IE Compatibility View

Mar 20, 2013

Environment:_
APEX Version 4.2.0.00.27
Theme 25

I have a number of pages that use the page template "*One Level Tabs - Content Frame*".End users that use Internet Explorer (versions 8 and 9), when they first visit the application their browser displays it in Compatibility View.They cannot see the side bar on the right-hand side, meaning that often they cannot see a lot of necessary buttons and info!

Their page displays as below: URL....

I am not sure it is possible, nor good practice, to force the app to display in non-compatibility mode.Is there a way to enhance their experience? Or another workaround?

At the moment I am waiting until they log an issue and then informing them to turn compatibility view off, or to use Chrome or Firefox. I'd like to make it better from my end!

View 6 Replies View Related

SQL & PL/SQL :: How To Make Horizontal Partitioning

Mar 4, 2013

how should i do to make horizontal partitioning?

View 18 Replies View Related

Forms :: Get The Horizontal Scroll Bar

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

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 View Related

SQL & PL/SQL :: How To Print The Multiple Output Statements In Single Output

Jul 1, 2013

DECLARE
JOBSFILE UTL_FILE.FILE_TYPE;
-- TAKE ALL JOB TITLES FROM JOBS
CURSOR JOBSCUR IS
SELECT *
-- DDOCNAME,DDOCTITLE,DSECURITYGROUP,DDOCAUTHOR,DDOCTYPE,DINDATE,PRIMARYFILE,EXTRACTIONDATE,BATCH_ID
FROM TARGET_UCM ;
[code].......

this is my plsql here to print table values i am using many utl_file.put_line statements is there any way to print all table values in a single utl_file.put_line.

View 2 Replies View Related

Forms :: Set Horizontal For Each Tab Pages In A Tab Canvas

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

SQL & PL/SQL :: Making Vertical Records To Horizontal

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

SQL & PL/SQL :: Convert The Table From Vertical To Horizontal

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

SQL & PL/SQL :: Query With Horizontal Running Totals

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

Forms :: Horizontal And Vertical Scroll Bar For Tabular

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

SQL & PL/SQL :: Horizontal Fragmentation In Oracle 10g Express Edition?

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

PL/SQL :: Calendar Month Dates In Horizontal Line

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

Forms :: Horizontal Scroll Bar In Stacked Canvas

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

Application Express :: Implement Horizontal Accordion

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

Forms :: Design Mode - Horizontal And Vertical Scroll Bar

Oct 25, 2010

How to create horizontal and vertical scrollbar at a time while design mode??

View 2 Replies View Related

Forms :: How To Find Table Names For The Fields In A Horizontal Form Of ASCP

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

Application Express :: Chart With Vertical Y-axis Title Having Horizontal Letters?

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

SQL & PL/SQL :: Splitting 1 Output Row Into 3 Output Rows

Sep 25, 2013

Currently I have a requirement where I need to create 2 more output rows using each result row.

In my requirement I am populating charges table with types of charges, on each line item of charges, I need to apply 2 types of taxes and populate it along with the charge line item. I will be storing charges in table charges and the 2 taxes to be applied in taxes table respectively. For each row of charges, i need to apply these 2 taxes present in taxes table resulting in 3 rows output.

--Create tables charges
create table charges
(
charge_type varchar2(10) ,
charge number
);

[Code]....

My expected output should be like below:

Item_type amount
-------------------- ----------
charge1 100
Charge1_tax1 10
Charge1_tax2 20
charge2 200
Charge2_tax1 20
Charge2_tax2 40

how I can achieve the expected output using a single sql query

View 6 Replies View Related

Application Express :: Create News Ticker To Scroll Images Horizontal At Bottom Of Page?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved