Sql Not Properly Ended Error -Solved

I was getting the error
[Oracle][ODBC][Ora]ORA-00933: SQL command not properly ended


For me, I had in my ASP page reading from an oracle table:

Select TT.myfield
>From mytable AS TT

It should have been without the "AS":

Select TT.myfield
>From mytable TT

I hope this helps someone else.
Thanks.Steve
shall [ Mi, 18 April 2007 16:47 ] [ ID #1691316 ]

Re: Sql Not Properly Ended Error -Solved

Gazing into my crystal ball I observed shall [at] uaex.edu writing in
news:1176907654.881962.78850 [at] y5g2000hsa.googlegroups.com:

> I was getting the error
> [Oracle][ODBC][Ora]ORA-00933: SQL command not properly ended
>
>
> For me, I had in my ASP page reading from an oracle table:
>
> Select TT.myfield
>>From mytable AS TT
>
> It should have been without the "AS":
>
> Select TT.myfield
>>From mytable TT
>
> I hope this helps someone else.
> Thanks.Steve
>
>

Yes, field names have "AS" aliases, eg:

SELECT a.field AS afield, b.field AS bfield FROM atable a, btable b


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Adrienne Boswell [ Do, 19 April 2007 08:44 ] [ ID #1692369 ]

Re: Sql Not Properly Ended Error -Solved

Adrienne Boswell wrote:
> Gazing into my crystal ball I observed shall [at] uaex.edu writing in
> news:1176907654.881962.78850 [at] y5g2000hsa.googlegroups.com:
>
>> I was getting the error
>> [Oracle][ODBC][Ora]ORA-00933: SQL command not properly ended
>>
>>
>> For me, I had in my ASP page reading from an oracle table:
>>
>> Select TT.myfield
>>> From mytable AS TT
>>
>> It should have been without the "AS":
>>
>> Select TT.myfield
>>> From mytable TT
>>
>> I hope this helps someone else.
>> Thanks.Steve
>>
>>
>
> Yes, field names have "AS" aliases, eg:
>
> SELECT a.field AS afield, b.field AS bfield FROM atable a, btable b

This restriction only seems to apply to Oracle as far as I have seen. This
would have kept me puzzled for quite a while if I had encountered it.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
reb01501 [ Do, 19 April 2007 12:42 ] [ ID #1692370 ]
Webserver » microsoft.public.inetserver.asp.db » Sql Not Properly Ended Error -Solved

Vorheriges Thema: Parse string from field CORRECT EMAIL
Nächstes Thema: DIVIDE BY ZERO ERROR, WHEN RUN FROM ASP PAGE