I am trying to convert a declare syntax from SQL to MySQL
the syntax is as follows:
declare @.x int ;
set @.x = (SELECT max(ixBugEvent) FROM bugevent) ;
UPDATE bugevent
SET ixAttachment = (SELECT max(ixAttachment) FROM attachment),
ixBug = (SELECT max(ixBug) FROM bug)
WHERE ixBugEvent = @.x;
but it is giving me an error. can anyone help.
thanks for your time in advance...Since people here generally speak SQL, not MySQL, you might
have better luck asking your question in a MySQL newsgroup.
(If you want to know how to same something in French, you'd ask
someone who speaks French, right?)
Steve Kass
Drew University
harpalshergill@.gmail.com wrote:
>I am trying to convert a declare syntax from SQL to MySQL
>the syntax is as follows:
>
>declare @.x int ;
>set @.x = (SELECT max(ixBugEvent) FROM bugevent) ;
>UPDATE bugevent
> SET ixAttachment = (SELECT max(ixAttachment) FROM attachment),
> ixBug = (SELECT max(ixBug) FROM bug)
> WHERE ixBugEvent = @.x;
>
>but it is giving me an error. can anyone help.
>thanks for your time in advance...
>
>|||(harpalshergill@.gmail.com) writes:
> I am trying to convert a declare syntax from SQL to MySQL
> the syntax is as follows:
>
> declare @.x int ;
> set @.x = (SELECT max(ixBugEvent) FROM bugevent) ;
> UPDATE bugevent
> SET ixAttachment = (SELECT max(ixAttachment) FROM attachment),
> ixBug = (SELECT max(ixBug) FROM bug)
> WHERE ixBugEvent = @.x;
> but it is giving me an error. can anyone help.
> thanks for your time in advance...
All I can say is hat I don't think that @.x variables are available in
MySQL. I would only expect those to work with SQL Server and Sybase.
There is a comp.databases.mysql. You should have better luck there.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Not only are variables available but they can used along with
columns in a query! :)
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97EFB333256EYazorman@.127.0.0.1...
> (harpalshergill@.gmail.com) writes:
> All I can say is hat I don't think that @.x variables are available in
> MySQL. I would only expect those to work with SQL Server and Sybase.
> There is a comp.databases.mysql. You should have better luck there.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||A more precise analogy might be to ask: if you want to know how to name
something in Creole French, you'd ask some one who speaks it, non?
Speak de patetois, non?
Steve Kass wrote:
> Since people here generally speak SQL, not MySQL, you might
> have better luck asking your question in a MySQL newsgroup.
> (If you want to know how to same something in French, you'd ask
> someone who speaks French, right?)
> Steve Kass
> Drew University
> harpalshergill@.gmail.com wrote:
>|||harpalshergill@.gmail.com wrote:
> I am trying to convert a declare syntax from SQL to MySQL
> the syntax is as follows:
>
> declare @.x int ;
> set @.x = (SELECT max(ixBugEvent) FROM bugevent) ;
> UPDATE bugevent
> SET ixAttachment = (SELECT max(ixAttachment) FROM attachment),
> ixBug = (SELECT max(ixBug) FROM bug)
> WHERE ixBugEvent = @.x;
>
> but it is giving me an error. can anyone help.
> thanks for your time in advance...
>
Two things that might help you get a response:
1. Include the error message, don't make us guess what error you're
getting.
2. Post to the proper newsgroup
No comments:
Post a Comment