I have a delete statement:
My original Delete:
DELETE FROM TableName A
WHERE SCHED_SURGERY_TM >= TRUNC(sysdate)-90
Now I need to delete based upon either START_TM or SCHED_SURGERY_TM :
DELETE FROM TableName A
WHERE
( case
when A.START_TM IS not...
I have an unconnected Oracle Stored Procedure that I'm running in a workflow.
In the Stored Procedure I have logic to invoke RAISE_APPLICATION_ERROR based upon a condition:
if nDupRows > 0 then
v_Err_Msg := 'Duplicate rows exists between Table_A and Table_B. Processing stopped until...
I have a mapping that has 2 parameters:
mBegDate --> Type=parameter --> DataType = nstring 11
mEndDate --> Type=parameter --> DataType = nstring 11
I'm trying to pass a date via the WorkFlow Variables and use in the mappings SQ Sql Override.
Both wf variables are set in the WF's...
I have an Oracle 11g table that I'm attempting to gather stats on.
Thru SQL Developer I exec the following:
EXEC DBMS_STATS.gather_table_stats('OWNER', 'TABLENAME');
However when I go to Statistics tab in SQL Developer; I can see the stats are not updating.
Any thoughts as to why/how...
I have an update to do on a Oracle 11g table and am looking for coding best practices.
Example:
UPDATE TABLE1
SET TRANSACTION_CODE = '3001', UPDATES = 'Y' WHERE TECHNICAL_DESCRIPTION = 'EDI adjustment credit - Sequestration - reduced fe' AND TRANSACTION_AMOUNT > 0 AND TRANSACTION_CODE =' '...
My source is a CSV file. It contains several date/times columns in the following format ( MM/DD/YYYY HH:MI )
DateField1
10/13/2008 10:40
10/13/2008 11:22
10/13/2008 12:50
10/13/2008 14:40
10/13/2008 15:01
If I recall, Informatica doesn't support to_date conversions without the seconds in the...
My source is a csv file that has a field ( FIRST_NAME ) that contains an ~ in it on some records. I want to filter those out. Below is the filter condition I'm attempting to use.
substr(FIRST_NAME,1,1) = REG_EXTRACT(FIRST_NAME,'^[a-zA-Z]')
I only want to pass records that start with an...
I'm needing to insert a row into a target an oracle table based upon a row count being passed from my SQ.
SQ:
COLUMN NAME: COUNT_OUT
Properties: Sql Query Attribute: select count(*) from TAB_A as COUNT_OUT
If COUNT_OUT > 240
insert a row into ORATAB
else
Do nothing
Is there...
I have a csv file that contains a source_field formatted as follows:
source_field string(19)
$193,249.54
$ 37,945.35
Note: $ is always in pos1
Target_Field NUMBER(12,2)
I need an expression to remove the $ and comma from the source_field so it will load as follows to the Target_Field...
I'm running Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.
I want to ALTER a table ( add a column ). Will this cause the synonym to become invalid?
Thank you.
Mufasa - very cool stuff. I need to research LAG/LEAD Analytic Functions further but I assume you can have multiple fields in the "PARTITION BY" clause.
I believe this will work for me.
Thank you!! Much appreciated.
I'm on oracle 10g. Looking for code samples that will caluclate days_diff between 2 dates on different rows. Below is some sample data.
Group by Field1
Row 1 = Days_diff between Row 1 e_dt and Row 2 b_dt
Row 2 = Days_diff between Row 2 e_dt and Row 3 b_dt
Row 3 = no calc because of...
Thank you LKBrwnDBA.
The results are exactly what I'm looking for. I assume you ran this in SQLPLUS? I'm working in SQL Developer....can it be accomplished the with a procedure?
I need a query to Flatten / Pivot the data from TableA ( See Flattened Results). For every PK_PATIENT_LEVELDATA row, there would be a column "Varname" with a value "Value".
Please note: not every PK_PATIENT_LEVELDATA can have 1:N number of VARNAMES/VALUES. Basically trying to create...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.