Query Error

Results 1 to 2 of 2

Thread: Query Error

  1. #1
    Join Date
    Dec 1969

    Default Query Error

    I&#039;m trouble shooting a error that now occurs since my Oracle DB has been imported into Access. This query worked fine using Oracle, but now gives me an error using the Access DB. The query in my ASP code is:<BR><BR>SQL_String = "SELECT "<BR>SQL_String = SQL_String & "TO_CHAR(DATE_X,&#039;DD MON YYYY&#039;) " + chr(34) + "DATE" + chr(34) + ", "<BR><BR>The error message I get is:<BR>Syntax error (missing operator) in query expression &#039;TO_CHAR(DATE_X,&#039;DD MON YYYY&#039;) "DATE"&#039;. <BR><BR>I thought that SQL statements worked with any database. Any help is, as always, greatly appreciated.

  2. #2
    Join Date
    Dec 1969

    Default 2 things

    No such thing as TO_CHAR in Access... (I believe it&#039;s cast and convert).<BR><BR>Second, Access dates are enclosed with #, not &#039;.<BR><BR>Though it looks like you&#039;re trying to SELECT a field name that&#039;s a date???

Posting Permissions

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