The normal practice when writing SQL PL (like Triggers, stored procs etc) is to have @ as the delimiter because ; is the default one for PL ..
In that case, we do
CREATE PROCEDURE ....
------
-------
SELECT col1 into :abc from tab1 ;
-----
----
END @
,save in a file file1.sql and do
db2 -td@ -f file1.sql
td@ indicates that the deliniter is semi-colon ...
I'm sure you can apply this explanation to your scenario
Sathyaram
Quote:
Originally posted by ansonee
I'm at thwe end of my rope. Hopefully someone can provide some direction....
I'm trying to run just a basic SQL script:
DECLARE @intPower INTEGER
DECLARE @intCounter INTEGER
DECLARE @intBITMAP INTEGER
SET @intCounter = 0;
WHILE @intCounter <= 10
BEGIN
SELECT @intPower = POWER(2,@intCounter);
SELECT @intBITMAP = db2admin.BITAND(256, @intPower);
IF @intBITMAP = @intPower
BEGIN
SELECT VALUES @intBITMAP;
END
SET @intCounter = @intCounter + 1;
END
The problem I'm getting is with the statement termination character. I've tried running it with the semi-colon turned off and kept getting the "End of file reached error". When I run the script above I get the "Unexpected token END-OF-STATEMENT" error.
Please help - I'm sure I'm missing something very obvious.
Thanks!
Anthony
--select 79 & 64
|