thanks !

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 [at] month='05';
set [at] year='2005';
update concat('table', [at] month, [at] 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, [at] month, [at] 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 [at] m.gmane.org
ROMEO PETRUCA [ Fr, 22 Juli 2005 06:34 ] [ ID #890326 ]

RE: thanks !

>
> error 1064 at line 4: you have an error in your SQL
> syntax near 'concat('table, [at] month, [at] 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 [at] m.gmane.org
ml.mysql [ Fr, 22 Juli 2005 16:15 ] [ ID #890327 ]

RE: thanks !

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 [at] in-genius.com]
Sent: Friday, July 22, 2005 8:16 AM
To: win32 [at] lists.mysql.com
Subject: RE: thanks !


>
> error 1064 at line 4: you have an error in your SQL
> syntax near 'concat('table, [at] month, [at] 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=3Djfrankman [at] idfbins.com


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32 [at] m.gmane.org
James Frankman [ Fr, 22 Juli 2005 16:22 ] [ ID #890328 ]

RE: thanks !

>
>
> I have not been using quotes or ticks to surroung my table
> 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.

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 (`)

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 [at] m.gmane.org
ml.mysql [ Fr, 22 Juli 2005 16:30 ] [ ID #890329 ]
Datenbanken » gmane.comp.db.mysql.windows » thanks !

Vorheriges Thema: export data to file.txt
Nächstes Thema: Store Procedures