<cfquery name="myName" datasource="#mydatasource#">
UPDATE SYSTEMINFO
SET LOGINPAGEMESSAGE = 'Welcome to here'
WHERE DATACALL = 2
</cfquery>
-----Original Message-----
From: Semrau Steven Ctr SAF/IE [mailto:[EMAIL PROTECTED]
Sent: Monday, May 24, 2004 1:18 PM
To: CF-Talk
Subject: Need Help with SQL inside CFQUERY
Okay, I'm new to doing straight SQL inside of a CFQUERY tag so any and all
advice / help is greatly appreciated - here is what I'm running into:
My DB guy wants (reasons I can't explain) me to run some SQL with the
CFQUERY tag. When I run the code below as is (multiple lines):
<cfquery name="myName" datasource="#mydatasource#">
BEGIN
UPDATE SYSTEMINFO
SET LOGINPAGEMESSAGE = 'Welcome to here'
WHERE DATACALL = 2;
END;
</cfquery>
I'm getting an error of:
Oracle Error Code = 6550
ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol "" when
expecting one of the following: begin case declare exit for goto if loop mod
null pragma raise return select update while with << close current delete
fetch lock insert open rollback savepoint set sql execute commit forall
merge pipe
However, if I run the SQL as ONE line:
<cfquery name="myName" datasource="#mydatasource#">
BEGIN UPDATE SYSTEMINFO SET LOGINPAGEMESSAGE = 'Welcome to here' WHERE
DATACALL = 2; END;
</cfquery>
This runs fine.
Our situation is that I have SQL that is a couple hundred lines long and
putting that all on one line just doesn't make sense. I've seen messages in
the past with SQL code done line by line within a CFQUERY - where am I going
wrong here!?!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

