Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Octets in teradata

Posted on 2013-10-24
3
Medium Priority
?
131 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 41

Accepted Solution

by:
Sharath earned 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

704 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