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: *

  • Users: lel75
  • Order by date
  1. lel75

    dbms_sql ... please help!

    Thanks for the quick response Dan & Dima... You guys are great! I was missing the execute statement.
  2. lel75

    dbms_sql ... please help!

    Hello everyone, I am sorry but I have another problem with dbms_sql. I have the following program: DECLARE stmt INTEGER; BEGIN -- --Read in user values v_start_dt := '&START'; v_end_dt := '&END'; stmt := dbms_sql.open_cursor; dbms_sql.parse(stmt...
  3. lel75

    execute immediate....please help!

    Hello everyone, I double checked the Oracle version here and it's actually 8.0.5 and not 8.1.5 (which should work with execute immediate). I apologize for all the confusion. I'll be sure to be more accurate and clear next time. Thanks for all your help! lel
  4. lel75

    execute immediate....please help!

    Thanks everyone for your help. I followed both gunjan14's and sem's suggestions using dbms_sql and both worked....thanks again! --lel75
  5. lel75

    execute immediate....please help!

    Thanks Dave. We have Oracle 8.1.5 here but it doesn't seem it work. Could it be that the execute immediate only works on 8.1.7 or greater? If I can't upgrade, I guess I'm stuck with dbms_sql? I've never used this before and below is what I've come up with. I tried executing it but got...
  6. lel75

    execute immediate....please help!

    Hello everyone, I have the following sql script below using execute immediate: PROMPT Please enter in parameters when prompted... PROMPT start_dt PROMPT end_dt PROMPT DECLARE v_start_dt DATE; v_end_dt DATE; BEGIN -- --Read parameters v_start_dt := '&START_DT'...
  7. lel75

    selecting and inserting into the same table

    Dave, That worked! Thanks again and again for your help! Cathy
  8. lel75

    selecting and inserting into the same table

    Dave, I guess I should of clearly explained what I wanted to do. Currently there are over 1000 records in this table (stupid of me to use student table as an example) that I'm trying to duplicate values for. I would like to duplicate those 1000+ records so that I have over 2000 records in...
  9. lel75

    selecting and inserting into the same table

    Hello, I have the following select insert into statement: insert into student select student_id, student_cd, student_name from student where student_id = '9999' The two columns - student_id and student_cd are primary keys. When I try to insert, it gives me a 'unique constraint...
  10. lel75

    replacing single quotes with double quotes

    Dave, That worked! Thanks again for all your help. Cathy
  11. lel75

    replacing single quotes with double quotes

    Hello, I have problems querying through a web application system when a name has a single quote in it (e.g. O'Brien). Can you please show me how I can change this select so that the single quotes get replaced with double quotes? I've tried the REPLACE and the ESCAPE function but it does not...
  12. lel75

    several layers of nested if statements

    Thanks for all your help Dave. That worked like a charm. No, we do not delete from the trigger table. Thanks again.
  13. lel75

    several layers of nested if statements

    Hi Dave, Yes, what you said is correct. For the else section below, I meant to only capture stutus_flag of 'ACTIVE' ONLY, therefore I am going to change it to (:old.status_flag = 'ACTIVE') AND (:new.status_flag = 'ACTIVE'): ELSE IF (:old.status_flag = :new.status_flag) THEN IF...
  14. lel75

    several layers of nested if statements

    Hi Dave, I apologize for the alignment of the code. Yes, your re-alignment reflects the logic I need. However the last elsif which deletes from the table is not working. Do you know what I am missing? Thanks -LeL
  15. lel75

    several layers of nested if statements

    Hello, I have the following if statement with several layers of nesting. Everything seems to work fine except for the last elseif. Am I missing something, possibly an end if somewhere? IF (INSERTING OR :old.status_flag = 'INACTIVE') AND (:new.status_flag = 'ACTIVE') THEN INSERT INTO...
  16. lel75

    decode in an update statement

    Dave, Thank you for the prompt reply. This site is great! Yes, your response is exactly what I'm looking for. I was confused with the DECODE and now that you've explained it, things are alot clearer. Again thanks for the excellent support. lel75
  17. lel75

    decode in an update statement

    Can you please tell me if I am using decode correctly in this update statement? I am trying to compare a new and an old value in a trigger code and if the old value is not null and the new value is null, I would like for the value inserted into the table to be blank and not the value 'NULL'...

Part and Inventory Search

Back
Top