SQL syntax

Results 1 to 2 of 2

Thread: SQL syntax

  1. #1
    Join Date
    Dec 1969

    Default SQL syntax

    Hi <BR><BR>I have an access-db. In my column there are just numbers (like 301.11), but the column has been defined as Text.<BR>Now I have to select those numbers and sort them like real numbers. <BR>The last thing I tried:<BR>select distinct ID from object order by cast(ID as numeric)<BR>The error-message read:<BR>Syntax error (missing operator) in query expression &#039;cast(ID as numeric)&#039;.<BR>Can anybody help me?<BR><BR><BR><BR>Thanks<BR>Ingrid

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL syntax

    &#039;cast&#039; is not valis Jet-SQL syntax. You have to use CDBL(theValue)<BR><BR>[..] ORDER BY CDBL(id)<BR><BR>

Posting Permissions

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