Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. sa0309

    Case expression in the WHERE clause of a delete statment

    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...
  2. sa0309

    Passing an Oracle SP error message to Informatica Email Task

    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...
  3. sa0309

    Passing a date via the WorkFlow Variables

    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...
  4. sa0309

    Tables Stats not updating

    I've tried multiple ways. As mentioned above: From SQL Worksheet - EXEC DBMS_STATS.gather_table_stats('OWNER', 'TABLENAME'); From SQL Worksheet - ANALYZE table HART_MO_ETL.CUST_RMA_DENIAL_MANAGEMENT COMPUTE STATISTICS; also via right-click on tablename -> Statistics-> Gather statistics
  5. sa0309

    Tables Stats not updating

    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...
  6. sa0309

    SQL Update coding best practice

    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 =' '...
  7. sa0309

    Date Format Conversion

    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...
  8. sa0309

    Filter transformation - filter condition

    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...
  9. sa0309

    Conditional insert into a Target

    ...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 a "conditional" transformation or what...
  10. sa0309

    String to Number Conversion

    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...
  11. sa0309

    Is a Synonym Valid after "Altering" a table

    Agree with u Johnherman. Question answered. Thank you!
  12. sa0309

    Is a Synonym Valid after "Altering" a table

    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.
  13. sa0309

    Date Diff calculation - Code Snippet

    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.
  14. sa0309

    Date Diff calculation - Code Snippet

    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...
  15. sa0309

    Oracle Database 10g - Query to flatten data

    It is a very clever solution. Thank you. However; PIVOT is a SQL operation, introduced in Oracle 11g and i'm on 10g.
  16. sa0309

    Oracle Database 10g - Query to flatten data

    Apparently Oracle 10g doesn't like the LISTAGG function. Thanks
  17. sa0309

    Oracle Database 10g - Query to flatten data

    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?
  18. sa0309

    Oracle Database 10g - Query to flatten data

    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...
  19. sa0309

    Oracle Update with a two table join

    Chris - thank you for the code samples. The 3rd one worked perfectly for me. I greatly appreciate it!
  20. sa0309

    Oracle Update with a two table join

    ...= TMP.NEW_BENE_HIC_NUM Error at Command Line:12 Column:30 Error report: SQL Error: ORA-00904: "TMP"."NEW_BENE_HIC_NUM": invalid identifier 00904. 00000 - "%s: invalid identifier" *Cause: *Action: committed. I've verified all column names, etc. What am I missing? Thanks in advance.

Part and Inventory Search

Back
Top