Home > Archive > SQL Anywhere database > October 2005 > Re: ASA 9.02 - - can't execute stored-procedure, because Space-Character









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: ASA 9.02 - - can't execute stored-procedure, because Space-Character
Greg Fenton

2005-10-27, 7:40 am

M.Erlinger wrote:
> mmhhh....o.k. - this work's fine...................but why??? and why three
> ' - at begin and end of the string
>


Because without the quotes your code:

execute immediate 'COMMENT ON USER ' || is_Login || ' IS ' || is_Comment;


whittles down to:

COMMENT ON USER user_login IS Mike Username

The syntax of the COMMENT statement is:

COMMENT ON USER <userid> IS <string>

Without the single quotes around 'Mike Username', it is not seen as a
string but as two key words.

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com