If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Space in field name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-27-03, 05:05
Plarde Plarde is offline
Registered User
 
Join Date: Jan 2003
Posts: 54
Space in field name

I use an Old Access DataBase,
which has a Date field with space and a quote in the field name.

I use ColdFusion language as Dynamic Server.

Field name is : "date d'entrée",
1 space, 1 quote, 1 accentuated character.

In my SQL, I used [date d'entrée],

update employes
[date d'entrée]=#createODBCdate(form.ar_date)#
where [emp_id]=#get_last_rec.max_emp_id#

and I have an error on the Date update.
If I use a simple field name, I do not have that error.
But I must use this field name.(for the moment)

Thanks for any help to tell me how to point on this type of field name
via SQL.

Pierre.
__________________
Pierre (Pl-Arts)
Reply With Quote
  #2 (permalink)  
Old 11-27-03, 07:48
cvandemaele cvandemaele is offline
Registered User
 
Join Date: Oct 2003
Location: Switzerland
Posts: 140
Not an Access/ColdFusion guy, but did you try double-quotes ?

In Oracle and MSSQL, this works :

update t set "date d'entrée" = a_date_expression;

Good luck.
Reply With Quote
  #3 (permalink)  
Old 11-27-03, 08:31
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Re: Space in field name

Quote:
Originally posted by Plarde
update employes
[date d'entrée]=#createODBCdate(form.ar_date)#
where [emp_id]=#get_last_rec.max_emp_id#
looks like you forgot the SET keyword


rudy
http://r937.com/
Reply With Quote
  #4 (permalink)  
Old 11-27-03, 10:42
Plarde Plarde is offline
Registered User
 
Join Date: Jan 2003
Posts: 54
No, I just forgot it here in my quetsion,
but it is there in my real code.

Thanks.
__________________
Pierre (Pl-Arts)
Reply With Quote
  #5 (permalink)  
Old 11-28-03, 02:26
cvandemaele cvandemaele is offline
Registered User
 
Join Date: Oct 2003
Location: Switzerland
Posts: 140
Well ? Did you try using double-quotes ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On