Results 1 to 4 of 4

Thread: truncate in db2

  1. #1
    Join Date
    Feb 2003
    Location
    San Francisco,US
    Posts
    15

    Unanswered: truncate in db2

    hi all
    i want to use truncate in DB2 inside a sql stored procedure.
    i have used not logged initially but it doesn't work because of referential integrity.
    i tried
    import from :nul into ------
    but this statement is not accepted inside stored procedure.

    can u please tell me a way to use truncate inside stored procedure.
    as i am deleting more than 50 tables inside my procedure.
    which takes lot of memory and i have to change configuration files also.

    awaiting ur reply

    Thanks and Regards
    ashu
    Ashutosh Mishra
    Accenture India,Chennai
    call on - +91-9884118430

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605

    Re: truncate in db2

    Hi,

    You have a sintax error!

    Try this:
    - Windows
    IMPORT FROM NUL: OF DEL REPLACE INTO SCHEMA.TABLENAME

    -Unix
    IMPORT FROM /dev/null OF DEL REPLACE INTO SCHEMA.TABLENAME

    Hope this helps,
    Grofaty

  3. #3
    Join Date
    Feb 2003
    Location
    San Francisco,US
    Posts
    15

    tried that

    hey thanks for ur reply.
    but i have used that..
    the syntax is right i just wrote it roughly.
    i have used the same command .
    can u try executing this command inside a sql stored procedure,
    u will come to know about the problem.

    thanks
    ashu
    Ashutosh Mishra
    Accenture India,Chennai
    call on - +91-9884118430

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605

    Re: tried that

    Hi,

    Sorry, I don't know how to do this in stored procedure. I just saw your sintax error and I wrote the right one.

    Grofaty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •