Solved

Octets in teradata

Posted on 2013-10-24
3
115 Views
Last Modified: 2015-02-17
I get an error when I use octets to read byte data;

cast(SUBSTR(a.user_agt,1, 100, OCTETS) as char(255))) as kiyu
from a
Where end_dt >= '2013-09-01'
  and cr_dt >= '2013-09-01'
  and cr_dt < '2013-09-15'

[3707] syntax error, expected something like ')' between integer and ','
0
Comment
Question by:dfn48
3 Comments
 
LVL 40

Accepted Solution

by:
Sharath earned 500 total points
ID: 39598145
May be an extra ")". check this.
cast(SUBSTR(a.user_agt,1, 100, OCTETS) as char(255)) as kiyu
from a
Where end_dt >= '2013-09-01'
  and cr_dt >= '2013-09-01'
  and cr_dt < '2013-09-15'

Open in new window

0
 

Author Comment

by:dfn48
ID: 39598175
I am still getting the same error after I removed the extra ')'

cast(SUBSTR(a.user_agt,1, 100, OCTETS) as char(255)) as kiyu
from a
Where end_dt >= '2013-09-01'
  and cr_dt >= '2013-09-01'
  and cr_dt < '2013-09-15'

syntax 3707
0
 
LVL 13

Expert Comment

by:magarity
ID: 39667909
SUBSTR takes 3 arguments but you have 4. Are you thinking of the OCTET_LENGHT function?
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and marke…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question