dbTalk Databases Forums  

help with a SELECT query

comp.databases.mysql comp.databases.mysql


Discuss help with a SELECT query in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
halex2000
 
Posts: n/a

Default help with a SELECT query - 07-30-2006 , 03:19 PM






Hi all, I have tables with columns names containing dots and I'm trying to
build up queries as in:

select it.n.cuore.1.lemma from a027;
But I get errors complaining about a syntax error.

I have been told that for names containing special chars need to be wrapped
by squared brackets as in:

select [it.n.cuore.1.lemma] from a027

but I get the same error.
Can someone help me?



Reply With Quote
  #2  
Old   
Brian Wakem
 
Posts: n/a

Default Re: help with a SELECT query - 07-30-2006 , 03:21 PM






halex2000 wrote:

Quote:
Hi all, I have tables with columns names containing dots and I'm trying to
build up queries as in:

select it.n.cuore.1.lemma from a027;
But I get errors complaining about a syntax error.

I have been told that for names containing special chars need to be
wrapped by squared brackets as in:

select [it.n.cuore.1.lemma] from a027

but I get the same error.
Can someone help me?

Use backticks.

SELECT `it.n.cuore.1.lemma` FROM a027;


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png


Reply With Quote
  #3  
Old   
halex2000
 
Posts: n/a

Default Re: help with a SELECT query - 07-30-2006 , 03:34 PM



This works, thanks!

"Brian Wakem" <no (AT) email (DOT) com> ha scritto nel messaggio
news:4j4im4F6748pU1 (AT) individual (DOT) net...
Quote:
halex2000 wrote:

Hi all, I have tables with columns names containing dots and I'm trying
to
build up queries as in:

select it.n.cuore.1.lemma from a027;
But I get errors complaining about a syntax error.

I have been told that for names containing special chars need to be
wrapped by squared brackets as in:

select [it.n.cuore.1.lemma] from a027

but I get the same error.
Can someone help me?


Use backticks.

SELECT `it.n.cuore.1.lemma` FROM a027;


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png




Reply With Quote
Reply




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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.