.Net provider
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


.Net provider Expand / Collapse
Author
Message
Posted 6/28/2007 3:34:27 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 6/29/2007 8:04:00 AM
Posts: 11, Visits: 1
I'm trying to run query from SQL2005.

When I run the query in ODBC driver it works fine, but the .NET syntax will not take it.

the function I'm trying to use is:

SUBSTRING(field,x,y)

Has anybody had any luck using substring to get parts of field using the .NET driver?

Thank you.

Leo
Post #8010
Posted 6/28/2007 8:14:10 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/18/2008 12:31:12 PM
Posts: 3, Visits: 3
The syntax of your SUBSTRING function is not accepted by Teradata.

A sql statement that contains "SUBSTRING(field, x, y)" will work with the ODBC driver because it will modify the SUBSTRING function to the syntax that can be processed by Teradata.

The .Net Data Provider for Teradata does not modify the sql statement contained in the CommandText. So if you execute the command, an exception will get thrown that indicates that the sql statement contains a syntax error.

The syntax of the substring function will have to be changed to

SUBSTRING(field FROM x FOR y)

if you want to use the Teradata provider.

--Dave S.
Post #8011
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 9:01pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.141. 8 queries. Compression Disabled.