Sql Not Properly Ended Error -Solved

Sql Not Properly Ended Error -Solved

am 18.04.2007 16:47:34 von shall

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

Re: Sql Not Properly Ended Error -Solved

am 19.04.2007 08:44:46 von Adrienne Boswell

Gazing into my crystal ball I observed shall@uaex.edu writing in
news:1176907654.881962.78850@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

Re: Sql Not Properly Ended Error -Solved

am 19.04.2007 12:42:16 von reb01501

Adrienne Boswell wrote:
> Gazing into my crystal ball I observed shall@uaex.edu writing in
> news:1176907654.881962.78850@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"