August 12th, 2009

Host Programs, INSERT

Posted by admin in S. Host Programs

A host program INSERT does not require cursor control and functions the same as a stand-alone SQL INSERT. Here is an example of a host program CREATE TABLE and INSERT examples:

     EXEC SQL
       CREATE TABLE PILOT_TBL
        (PILOT_ID CHAR(5) PRIMARY KEY,
         FIRST_NAME CHAR(20) NOT NULL,
         LAST_NAME CHAR(20) NOT NULL,
         LICENSE_NO CHAR(10),
         PHONE_NO INTEGER NOT NULL DEFAULT)
     END-EXEC
     EXEC SQL
       INSERT INTO PILOT_TBL
       VALUES (:WS-PILOT, :WS-FIRST, :WS-LAST, :WS-LICENSE, WS-PHONE)
     END-EXEC
     EXEC SQL
       INSERT INTO PILOT_TBL
              (PILOT_ID, FIRST_NAME, LAST_NAME, LICENSE_NO, PHONE_NO)
       VALUES (:WS-PILOT, :WS-FIRST, :WS-LAST, :WS-LICENSE, WS-PHONE)
     END-EXEC

10 Responses to ' Host Programs, INSERT '

Subscribe to comments with RSS or TrackBack to ' Host Programs, INSERT '.

  1. Englye said,
    on October 18th, 2009 at 4:25 am

    Thank you, this is an outstanding list I’m fresh to all this but wish to setup my first blog soon so I stand for on printing this out and contributing it to my boxfile.

  2. on October 18th, 2009 at 7:17 pm

    Great post - I was just curious how do you get hold of such a good domain?

  3. on October 29th, 2009 at 9:16 am

    Thank you for your help!

  4. on November 8th, 2009 at 8:05 am

    Your blog is so informative

  5. on November 8th, 2009 at 11:07 am

    Interesting and informative. But will you write about this one more?

  6. on January 7th, 2010 at 4:19 pm

    thank you for this useful post. Site bookmarked..

  7. katier7 said,
    on January 9th, 2010 at 9:27 pm

    great ! theme, loove it

  8. poontirty said,
    on January 19th, 2010 at 2:07 pm

    Thanks seeking information. I am present to bookmark this page.

  9. on February 2nd, 2010 at 8:42 am

    This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It?s the old what goes around comes around routine.

  10. Cashion said,
    on February 20th, 2010 at 2:53 pm

    Finally, got what I was looking for!! I definitely enjoying every little bit of it. Glad I stumbled into this article! smile I have you bookmarked to check out new stuff you post

Leave a reply

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: