thanks !

thanks !

am 22.07.2005 06:34:35 von ROMEO PETRUCA

me to, i'm using MySQL 3.23.46, but still not working.

is about that SQL statments, in rellock.sc file:

use database;
set @month='05';
set @year='2005';
update concat('table',@month,@year) set
timeswitch=curtime() where locking='NULL';

and command line:

mysql < rellock.sc

and error message:

error 1064 at line 4: you have an error in your SQL
syntax near 'concat('table,@month,@year) set
timeswitch=curtime() where locking='NULL'' at line 1

romeo

Romeo Petruca
George Enescu 16/13
Hunedoara
0720301842



____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: thanks !

am 22.07.2005 16:15:35 von ml.mysql

>=20
> error 1064 at line 4: you have an error in your SQL
> syntax near 'concat('table,@month,@year) set
> timeswitch=3Dcurtime() where locking=3D'NULL'' at line 1

Don't use apostrophies(') use ticks (`) to quote the table name.

Also, your error indicates that you didn't close quote the table any
either.

-kevin

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

RE: thanks !

am 22.07.2005 16:22:57 von James Frankman

I have not been using quotes or ticks to surroung my table names in any =
of my sql statments. i.e. select * from tableABC

Is there a reason that you should surround table names with ticks?
-----Original Message-----
From: PF: MySQL [mailto:ml.mysql@in-genius.com]
Sent: Friday, July 22, 2005 8:16 AM
To: win32@lists.mysql.com
Subject: RE: thanks !


>=20
> error 1064 at line 4: you have an error in your SQL
> syntax near 'concat('table,@month,@year) set
> timeswitch=3Dcurtime() where locking=3D'NULL'' at line 1

Don't use apostrophies(') use ticks (`) to quote the table name.

Also, your error indicates that you didn't close quote the table any
either.

-kevin

--=20
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: =
http://lists.mysql.com/win32?unsub=3Djfrankman@idfbins.com


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

RE: thanks !

am 22.07.2005 16:30:34 von ml.mysql

>=20
>=20
> I have not been using quotes or ticks to surroung my table=20
> names in any of my sql statments. i.e. select * from tableABC


Sorry, it's early here and I haven't had my coffee yet. I shouldn't
answer mails before I wake up completely. :(


I rarely use CONCAT so I thought it was a fieldname in there but it's
actually a string.=20

I don't know if this is your issue or not: Your example error message
is showing that you don't have a closing quote (') on the last part of
'table' (I saw the word table and my sleepy mind filled made an
assumption.)



> Is there a reason that you should surround table names with ticks?

Yes if the table name might be confused with a reserved keyword (like
'concat)

You can enclose database, table and field names in ticks (`) =20

SELECT * FROM `mytable` WHERE `field1`=3D'key'

-kevin

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org