Ask a Question related to IBM DB2, Design and Development.
-
Mark Yudkin #1
Re: Multi command files and running them from the command prompt
Use the -td§ option [where § is the desired character]. Details are in the
section titled Command Line Processor Options in the Command Reference.
"Derek Clarkson" <dclarkson@waterwerks.com.au> wrote in message
news:3f406c14@mail.netspeed.com.au...load.> Hello,
> I have a problem. I have a number of functions which I need tosemi-colons> However these functions contain embedded semi-colons. For example
>
> (1) CREATE FUNCTION REVERSE(INSTR VARCHAR(4000)) RETURNS VARCHAR(4000)
> (2) begin atomic
> (3) return 'ABC';
> (4) end
>
> The problem is that if I have a .sql file containing this function and run
> it like this:
>
> db2 -t -f script.sql
>
> Then db2 gets to the semi-colon at the end of line 3 and assumes it is the
> end of the create function command. Which generates an error. If I run the
> script without the -t flag then DB2 gets to the end of the first line and
> assumes thats it, resulting in another error.
>
> The only way we have found to run this is to apply back slashes to each
> line, resulting in:
>
> (1) CREATE FUNCTION REVERSE(INSTR VARCHAR(4000)) RETURNS VARCHAR(4000) \
> (2) begin atomic \
> (3) return 'ABC'; \
> (4) end
>
> Our preferred way would be to not have the back slashes and usewould> to delimit commands. However the DB2 interpreter seems to not be able to
> handle nested statements in functions like this.
>
> How have you guys handled this situation ? any thoughts or experience> be appreciated.
>
> cio
> Derek.
Mark Yudkin Guest
-
Trying to compile a cs from command prompt
Hello I am authoring a custom server control in dreamweaver using c# i need to compile it from the command prompt but for some reason i get the... -
flash and command prompt
how to type commands in flash projector so they could be sent to command prompt? -- --------------- CTeam_2004 | --------------- Macromedia... -
how to restrict command prompt
Any one knows how to restrict command prompt in proup policy -
Problem with the Command Prompt
Hello ! I have Windows XP Professional at home. When I try to run the command prompt by going to Start --> Run and typing cmd, the DOS command... -
FTP Error from command prompt
I am trying to access my web site throught the command prompt using FTP. I frequently get error messages like the following: 500 "PORT... -
Derek Clarkson #2
Re: Multi command files and running them from the command prompt
Thanks guys, -td@ worked just fine.
cio
Derek.
Derek Clarkson wrote:
> Hello,
> I have a problem. I have a number of functions which I need to
> load.
> However these functions contain embedded semi-colons. For example
>
> (1) CREATE FUNCTION REVERSE(INSTR VARCHAR(4000)) RETURNS VARCHAR(4000)
> (2) begin atomic
> (3) return 'ABC';
> (4) end
>
> The problem is that if I have a .sql file containing this function and run
> it like this:
>
> db2 -t -f script.sql
>
> Then db2 gets to the semi-colon at the end of line 3 and assumes it is the
> end of the create function command. Which generates an error. If I run the
> script without the -t flag then DB2 gets to the end of the first line and
> assumes thats it, resulting in another error.
>
> The only way we have found to run this is to apply back slashes to each
> line, resulting in:
>
> (1) CREATE FUNCTION REVERSE(INSTR VARCHAR(4000)) RETURNS VARCHAR(4000) \
> (2) begin atomic \
> (3) return 'ABC'; \
> (4) end
>
> Our preferred way would be to not have the back slashes and use
> semi-colons to delimit commands. However the DB2 interpreter seems to not
> be able to handle nested statements in functions like this.
>
> How have you guys handled this situation ? any thoughts or experience
> would be appreciated.
>
> cio
> Derek.Derek Clarkson Guest



Reply With Quote

