Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    54

    Unanswered: 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)

  2. #2
    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.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002

    Re: Space in field name

    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/

  4. #4
    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)

  5. #5
    Join Date
    Oct 2003
    Location
    Switzerland
    Posts
    140
    Well ? Did you try using double-quotes ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •