SQL & PL/SQL :: How To Append Sign Of % And Adapt Output

Jan 24, 2012

I have following table: tab1

id configured_size current_size percentage
1 500 100 20
2 300 100 33
... ... ...

When I launch select * from tab1 I get :

id configured_size current_size percentage
1 500 100 20
2 300 100 33
... ... ...

My question is is there any way how to edit the abovementioned select to get something like :

id configured_size current_size percentage
java_eml 500 100 20%
java_hdl 300 100 33%
... ... ...

I want to append two things:

sign of % in row percentage
when id =1 then in output have java_eml
when id =2 then in output have java_hdl

The problem is I cant update the table (not sufficient rights) so is there any way how to adapt that output?

View 7 Replies


ADVERTISEMENT

How To Completely Remove Single-Sign On

Jul 9, 2013

RE: Partial install of SSO leaves orphaned instances.

Background: Lost connection to Linux system while attempting SSO install. During reinstall installer states instance name already in use - suggests using different name.

Using deconfig.pl tool (user: cn=orcladmin) to remove SSO configuration, but error encountered. Reason: incorrect SYS password. Note: Can access db using SYS password with no problem.

Question: Does deconfig.pl completely remove SSO configuration? If not, what other steps are required to completely remove SSO?

View 1 Replies View Related

Forms :: Customize Sign In Popup?

Jan 4, 2013

how can i create and customize a sign in popup when running an oracle form?

View 1 Replies View Related

SQL & PL/SQL :: How To Take Sign Off And Rest Field Value Of First Row For Same Staff

Feb 22, 2013

The below query is taken from the procedure

SELECT l_stafnum = stafnum,
category,
duty,
date,
signon,
signoff,
l_rest = rest,
valid,
FROM SESSION.valid_pf
WHERE invalid != 'I'

In the above query has set of data which each staff may have more than one duty.

For example

stafnum categoy duty date signon signoff rest valid
232 M a/c 2/3/12 5:00 8:00 12:00 I
232 M Sup 2/3/12 10:00 13:00 8:00 I
111 M Clen 2/3/12 9:00 12:00 12:00 I
232 M Sw 2/3/12 15:00 20:00 12:00 I
111 M Wp 2/3/12 10:00 14:00 06:00 I
121 M a/c 2/3/12 5:00 8:00 12:00 I

The select query will retrieve the value which mentioned this example.Now, First I need to take how many duty has been allocated for each stafnumber.

232 staff allocated to three duty (a/c,sup,sw) Then need to compare signoff value for first row addition of rest value for the same row i.e, i = 08:00+1200

Then need to compare value of signon for the same staff 232 for the second row which is 10:00 if (i>10:00) then valid;

how I can take same staff number and find it how many duty the staff has.And how to take sign off and rest field value of first row, for the same staff then compare those value with the same staff number second row signon value.

View 7 Replies View Related

SQL & PL/SQL :: Extract Numerical Value Preceding Percentage Sign

Jan 17, 2012

I have two values:

'AA:10%:1'
'AC:P35:20%'

I need to extract the numerical value preceding the '%' sign. for first row 10 should be extracted and for the second 20.

View 2 Replies View Related

Reports & Discoverer :: How To Print Tick Sign In 10g

Jun 5, 2012

searched here for Tick Sign in Reports & Discoverer section, but did not find. i am trying to work on Reports and have a requirement of Tick Sign should appear in report if the column value is 'Y' means yes.

i tried following SQL statement in SQL*Plus, but failed to find and Tick Sign.

declare
n number:=0;
c varchar2(1);
begin
for i in 1..255
loop
select chr(i)
into c
from dual;
dbms_output.put_line ('* '||lpad(to_char(i),3,' ')||' -> '||c);
end loop;
end;

View 3 Replies View Related

Forms :: 6i Displaying Oracle Only Negative Sign

Nov 12, 2012

can you to display a field with negative value

S -- format mask display both sing + and -
MI -- format mask display negative sign at end
PR --Returns negative value in <angle brackets>. and Returns positive value with a leading and trailing blank.

I want the output should display only leading negative if the value is negative. I have used S99990.99 as format Mask. but need output should display only leading negative if the value is negative.

View 1 Replies View Related

SQL & PL/SQL :: Number Datatype Formatting To Show $ Sign And Commas

Mar 8, 2011

I have a Number(18,0) datatype.It could have millions/billions stored in that field.How can I show that amount in the form of $7,123,787 ($ sign and commas)?

By using To_char function like below, I am not getting the desired format.

Select to_char(123000000.25, '$9,9999999999.00') FROM dual;

Result is (no commas):

$123000000.25

View 2 Replies View Related

Application Express :: Format Mask For Percent Sign

May 16, 2013

Is there no format mask for Percent sign. My customer is creating a Computed field and wants to have the percent sign added to the result. (like a dollar sign). I saw some posts about adding jQuery..??? Is this going to be added to the APEX code some day?

Just like the Money format, FML999G999G999G999G990D00, where did FML come from? it translates to a dollar sign. Isn't there something that could translate to a percent sign

990D000PCT     75.328%

View 3 Replies View Related

Append Columns From One Table To Another

Nov 14, 2011

Perhaps this is a common request : I have 2 tables:

Table A
-------
ID Value
1 a
2 b
3 c

Table B
-------
ID AnotherValue
1 x
2 y

I am hoping to append a column from Table B to Table A based on a simple sql join (e.g:

Table A

ID Value AnotherValue
1 a x
2 b y
3 c (null)

)

I would rather stay away from the standard update statement since it takes far to long and I'd prefer not to use create table as I don't want to duplicate any data...is this possible to do ? (e.g: just insert the columns into this table ?) - or if it's possible the performance overhead just wouldn't make it worth it ?

View 4 Replies View Related

SQL & PL/SQL :: Append Collection Variable

Oct 11, 2012

Declare
Cursor c1...;
Cursor c2...;
begin
open c1 ;
fecth c1 bulk collect into v1;
close c1;

[Code]...

Is there any way by which if condition gets true then v1 gets appended rather than being overwritten?

declare
type lst_deptno is table of dept.deptno%type index by binary_integer;
type lst_deptno_emp is table of emp.deptno%type index by binary_integer;
v_deptno lst_deptno;
v_deptno_emp lst_deptno_emp;
cursor c1 is select deptno from dept;

[Code]...

View 8 Replies View Related

PL/SQL :: Append Values If Repeating Same Name?

Jan 4, 2013

if the same name repeating it should to append with _1 and _2 until same name reached.

select 'fname' name from dual
union all
select 'lname' name from dual
union all
select 'email' name from dual
union all
select 'fname' name from dual
union all
select 'fname' name from dualmy output should be like below...

fname
lname
email
fname_1
fname_2

View 11 Replies View Related

PL/SQL :: Append In Control File

Feb 14, 2013

I am just looking to my control file that I have. I have managed to successfully get my control file to load data into the required tables but just for my learning I was trying to amend the when clause with an and condition but keep getting an error.

My code:
OPTIONS (DIRECT=TRUE, ERRORS=0, SKIP=1)
load data
infile 'A:/My Files/Feeds/20130211/data_summary_1_20131214.txt' "STR '
'"

APPEND
into table I_DATA_1
WHEN (RID <> 'RID')
fields terminated by "~|~" optionally enclosed by '"'
TRAILING NULLCOLS
(
 RID,
S_TIMESTAMP   timestamp 'DD-MON-RR HH:MI:SS.FF3 PM'
)

the above code works perfectly but if i change the following line:

WHEN (RID <> 'RID' AND 'S_TIMESTAMP' IS NOT NULL)than this gives me an error.

View 4 Replies View Related

SQL & PL/SQL :: CLOB Column Append

Feb 13, 2013

I have a requirement when I need to append and show the contents of a CLOB (rich text) column into the Open office report.

The use case is as below.
User(s) can enter the details into a CLOB column.
This data entered by each user need to be concatenated onto another CLOB column which will hold all the history of changes. Mainly i wanted to perform a concatenation of these two columns.

|
| User Entered | Stored |
| Data Stored in Clob Column 1| Data Stored in Clob Column 2 |
| v_clob_1 | v_clob_target |
-------------------------------------------------------------------------------
|"Text 1" and a image |"Text 1" and a image |
-------------------------------------------------------------------------------

Any method to achieve this case. I had tried the following method to achieve this. But no success.

v_merge clob;
v_clob_target clob;
v_clob_1 clob;

1)
DBMS_LOB.APPEND(v_merge, v_clob_target);
DBMS_LOB.APPEND(v_merge, v_clob_1);

2)
DBMS_LOB.APPEND(v_clob_target, v_clob_1);

3)
v_merge:= v_clob_target || ''|| v_clob_1;
v_clob_target := v_merge;

View 6 Replies View Related

Server Administration :: How To Append When Get Ddl

Aug 8, 2011

Have got ddl of index,but it is not append ';' end of each index,how to append ';' by auto.

Select
Dbms_Metadata.Get_Dependent_Ddl(Object_Type => 'INDEX',
Base_Object_Name => 'TB_HXL_USER')
From Dual

result:

[Code].....

View 2 Replies View Related

How To Append Timestamp To Log File In SQL*Plus

May 9, 2013

Version: 11.2.0.3
Platform : RHEL 5.8 (But I am looking for platform independant solution)

I want to append the timestamp to spooled log file name in SQL*Plus.The spooled log filename should look like

WMS_APP_23-March-2013.logI tried the following 3 methods found in the google. But none of them worked !

I tried this

col sysdt noprint new_value sysdt_var
SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
spool run_filename_&sysdt_var.Logas suggested in

[URL]

and this

spool filename with timestamp
col sysdt noprint new_value sysdt
SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
spool run_filename_&sysdt..Logas suggested in

[URL]

and this

column tm new_value file_time noprint
select to_char(sysdate, 'YYYYMMDD') tm from dual ;
prompt &file_time
spool logfile_id&file_time..logas suggested in

Creating a spool file with date/time appended to file name

None of the above worked in RHEL or MS DOS.

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

Inserting Millions Of Rows Using Append?

Aug 6, 2011

INSERT /*+ APPEND */
INTO sales_fact
SELECT *
FROM customer_sales_fact_staging
ORDER BY time_wh_id;
COMMIT;

[URL]

Suppose in the above case

SELECT *
FROM customer_sales_fact_staging
ORDER BY time_wh_id;
returns a huge number say more than 10 million or 50 million

will the commit work(one single transaction)

View 1 Replies View Related

Can HINT Append Generate Error

Mar 1, 2007

I've got SQL code generated by an HP tool to make an update of itself. This code is not modifiable because was execute 'in background' from the tool updater.

The macro operations made by the updater (through sql code) are:

--create a copy of actual table and rename with '_old' suffix
--create new table, with indexes and constraints
--insert data into new table from old tables

Now, only in one table, when the data were inserted, an ORA-00001: unique constraint (ASSET_SVIL.CFG_CFGSECTIONCFGE) violated, appear.

To insert data is used an insert/select statement with an HINT /* APPEND */. We verify all the data existing in the old table (that is the data to 'migrate') but there aren't duplicate record!

BUT IF WE REMOVE THE HINT /* APPEND */, THE INSERT/SELECT STATEMENT WORKS WITHOUT GENERATE ERRORS!!

View 8 Replies View Related

Insert Using Append / Bulk Correct?

Aug 3, 2011

I want to know which is the most efficient insert method among the followiing

1)using the hint append
or
2)bulk collect. Preferably I'd like to know which method of inserting for say 2-5 millions rows is the best.

View 6 Replies View Related

SQL & PL/SQL :: Append Or Merge 2 Utl_files To One File?

Jun 25, 2010

Am extracting data from a database and putting them in 2 different utl_files. In the end i want to append or merge the 2 utl_files to one file.

View 10 Replies View Related

How To Copy Set Of Rows N Times And Append Them With Different Value For A Column

May 27, 2011

Im trying to replicate a set of rows multiple times to create large volume. I am trying by For Loop, but got confused how to pass the parameters in any cursor i declare.

View 8 Replies View Related

SQL & PL/SQL :: Concat Or Append In Long-raw Type Column?

Feb 4, 2012

Im having mail content column of type long Raw in a table.i just want concat or append a value in that column when i tried it shows error "illegal use of long type".how to append value to it. value will be string type

View 15 Replies View Related

SQL & PL/SQL :: Append More Rows In Single Clob Column

Apr 9, 2013

I have a query which returns nearly 20k rows, as per the requiremnet we need to append all these rows in specific format and insert into single clob column.in the below procedure test_clob.textt is clob field.

CREATE OR REPLACE PROCEDURE pro_test
v_mas_seq NUMBER (9);
v_gov_total NUMBER (20, 2);
v_emp_total NUMBER (20, 2);
v_text_exp CLOB;
v_pageaccess VARCHAR2 (15);
v_dto NUMBER (7) := 4011486;
v_batchno NUMBER (20) :=
[code]....

View 15 Replies View Related

SQL & PL/SQL :: No Entries In Materialized View Log For Insert Append?

Aug 9, 2010

I've created a materialized view log on table with the following statement:

CREATE MATERIALIZED VIEW LOG ON table_a
WITH ROWID, SEQUENCE (column_a, column_b, column_c)
INCLUDING NEW VALUES;

The insert is done with the following statement:

INSERT
/*+ APPEND PARALLEL("table_a") */
INTO
"table_a"
("column_a",
"column_b",
"column_c",
"column_d_sum")
(select
column_a",
"column_b",
"column_c",
"column_d_sum"
from table_B)

But the Log is empty when the insert is finished. When I insert rows without the APPEND hint, rows are created in the log table. So, doesn't the log record bulk loads?

View 6 Replies View Related

SQL & PL/SQL :: How To Append Data Into Macro-enabled Excel File

Aug 18, 2010

My requirement is to export Oracle table's data into an already existing excel file with Macros (.xlsm) using a procedure. I am able to write/append the data into the simple .xls file. But I am searching whether any way of appending into .xlsm file. "how can we append the data into a Macro-enabled excel file?".

View 3 Replies View Related

SQL & PL/SQL :: How To Append Data To Existing CLOB Field In Oracle Table

Sep 13, 2010

code to append data of 32k to exisitng CLOB field in an oracle table..

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

Server Utilities :: Append Tables Content To Existing Tables?

Nov 9, 2010

problem on oracle 11gR2 where i have to import data from a source database to an existing table without truncate or drop the target table in the target database.

we have found something called table_exist_action=append in impdp.

View 2 Replies View Related

SQL & PL/SQL :: Use Reg-Exp To Get Required Output?

Mar 11, 2013

Following query is giving me the required output but i want to use reg_exp from same output.

SELECT TO_NUMBER ((SUBSTR (narr,
INSTR (narr, '#') + 1,
(INSTR (narr, 'DT')) - (INSTR (narr, '#') + 1)
) "Bill No"
FROM (SELECT '25 NOS. BILL BOOK FOR FAISALABAD @80/- TH A.R. PRINTER AGST BILL#21 DT:31-01-2013 TH

[code]...

Required Output using Reg_Exp

SQL>/
Bill No
----------
21
9

View 6 Replies View Related







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