Solved

Octets in teradata

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

920 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

16 Experts available now in Live!

Get 1:1 Help Now