mysql - How to run a script in DB2 along with other sqls -
i had doubt regarding db2. created script example.
begin select * abc; end now want run in report generator have select queries joins , everything. script has purpose of reading input , parsing string , store details in temporary table (this part done). other select queries work on table.
but how put both these things in 1 file or should create separate files (a procedure script , execute in sql report). want know if there way of doing in same file.
in db2 there no way deal standard input when using scripts in db2clp. console send commands db2, commands should prepared.
in order deal user input, use shell scripts, .bat in windows or bash/korn shell scripts. these scripts take user input, , construct commands send db2.
read id db2 "select * emp id = ${id}" for previous approach, need create scripts each platform (windows , *nix-bash or korn)
however, there way deal user input in db2 need use clpplus. sql*plus, , can input user variable, , query database value.
Comments
Post a Comment