#1  
Old 29th October 2005, 08:19 PM
Dennis Esmonde-White
 
Posts: n/a
Default Using UPDATE in stored proc "Unkown column error"

This worked in 2.0 but not in 2.02 and 2.03

Did I miss something, or am I the only one to ever try this.
The engine tries to evaluate the parameter as a column. hence the
returned error.
I have tried to use CAST and various other tricks but no way can I make
it work.

DROP ROUTINE IF EXISTS "test";

CREATE PROCEDURE test
( IN aLinkGuid GUID,
IN aOperatorNo WORD,
IN aFirstName SHORTSTRING,
IN aLastName SHORTSTRING )

MODIFIES SQL DATA

BEGIN
UPDATE "Operators"
SET
operatorFirst = aFirstName,
operatorLast = aLastName
WHERE
( "Operators".guidLink = aLinkGuid)
AND
("Operators".operatorNo = aOperatorNo) ;
END;
  #2  
Old 30th October 2005, 12:09 AM
Ole Willy Tuv
 
Posts: n/a
Default Re: Using UPDATE in stored proc "Unkown column error"

Dennis,

> This worked in 2.0 but not in 2.02 and 2.03


It works fine here with 2.03.01.

Ole


  #3  
Old 30th October 2005, 02:49 AM
Dennis Esmonde-White
 
Posts: n/a
Default Re: Using UPDATE in stored proc "Unkown column error"

Ole Willy Tuv wrote:
> Dennis,
>


Hi Ole,

I must be loosing it. I have been messing around with this all day. I
won't even work in EM.

I uninstall 2.03.02, re-install 2.00 and it works.
I uninstall 2.00, and install 2.03.00 and it does not work.

Thanks anyway. At least I know there is something extra or wrong with
the install

Cheers
Dennis




  #4  
Old 4th November 2005, 10:55 AM
Chris
 
Posts: n/a
Default Re: Using UPDATE in stored proc "Unkown column error"

I *thought* that prameters had to be in the form of @ParamName

So it would become something like

> DROP ROUTINE IF EXISTS "test";
>
> CREATE PROCEDURE "test" --Note the Quotes
> ( IN @aLinkGuid GUID,
> IN @aOperatorNo WORD,
> IN @aFirstName SHORTSTRING,
> IN @aLastName SHORTSTRING )
>
> MODIFIES SQL DATA
>
> BEGIN
> UPDATE "Operators"
> SET
> operatorFirst = @aFirstName,
> operatorLast = @aLastName
> WHERE
> ( "Operators".guidLink = @aLinkGuid)
> AND
> ("Operators".operatorNo = @aOperatorNo) ;
> END;


That said, perhaps your initial a is an @ but it got converted by your mail
reader.

"Dennis Esmonde-White" <dew@tac-africa.co.za> wrote in message
news:43633347@wic040d....
> This worked in 2.0 but not in 2.02 and 2.03
>
> Did I miss something, or am I the only one to ever try this.
> The engine tries to evaluate the parameter as a column. hence the returned
> error.
> I have tried to use CAST and various other tricks but no way can I make it
> work.
>
> DROP ROUTINE IF EXISTS "test";
>
> CREATE PROCEDURE test
> ( IN aLinkGuid GUID,
> IN aOperatorNo WORD,
> IN aFirstName SHORTSTRING,
> IN aLastName SHORTSTRING )
>
> MODIFIES SQL DATA
>
> BEGIN
> UPDATE "Operators"
> SET
> operatorFirst = aFirstName,
> operatorLast = aLastName
> WHERE
> ( "Operators".guidLink = aLinkGuid)
> AND
> ("Operators".operatorNo = aOperatorNo) ;
> END;



  #5  
Old 4th November 2005, 11:15 AM
Dennis Esmonde-White
 
Posts: n/a
Default Re: Using UPDATE in stored proc "Unkown column error"

Chris wrote:
> I *thought* that prameters had to be in the form of @ParamName
>


Nah, the a is actually an a and not a @. Syntax thing I have sort of
earned by cutting heaps of pascal code.

I'm pretty new to using stored procs. None of the examples I have seen
use @ but I will try it anyway.

Anyone know why the @ is used in the first place?

Dennis
  #6  
Old 4th November 2005, 12:16 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Using UPDATE in stored proc "Unkown column error"

> Anyone know why the @ is used in the first place?

Its because many people are used to it from MSSQL.

--

Eivind Bakkestuen
Nexus Database Systems


  #7  
Old 4th November 2005, 06:23 PM
Ole Willy Tuv
 
Posts: n/a
Default Re: Using UPDATE in stored proc "Unkown column error"

Chris,

>I *thought* that prameters had to be in the form of @ParamName


No, parameter names follow the same rules as for other identifiers.

Ole




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: SuperFastDistinct! -- 5x, 10x, 100x faster than TnxQuery's "Select Distinct column..." Barry nexusdb.public.support.thirdparty 0 26th April 2006 03:49 AM
One more needle... "General error" Eric Hill nexusdb.public.support.odbc 0 16th December 2005 07:55 AM
"Invalid Variant Type Conversion" error on LEFT OUTER JOIN Arturo Monge nexusdb.public.support.sql 5 21st July 2004 08:33 PM
Announcment! "The Keep" ver 2.0.0.1 and "Po Boy Application LifeCycle Management Utility" ver 1.0.0.l are now both available for free download! Robert Meek nexusdb.public.support.thirdparty 1 11th July 2004 11:23 AM
False "non aggregate column must appear in group by" JC Boggio nexusdb.public.support.sql 3 23rd April 2004 02:40 AM


All times are GMT +11. The time now is 07:46 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.