Solved

Octets in teradata

Posted on 2013-10-24
3
106 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Note: You must have administrative privileges in order to create/edit Sharing Rules. 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 an…
In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now