0 - 12 of 12 tags for substring

Hi Team - i have a string field with about 600,000 rows like the below. Aster data base is connected through Teradata Studio.
Text1,Text2,Text3
Text1,Text2
Text1,Text2,Text3,Text4,Text5

Hi,
I am having hardtime writing the most eficient SQL for the following use case.
Column(URL)
/extreme/social/Step7.jsp?Source=1234&returnURL=/dyn/dyn/servlet/securePdf.dyn?file=/content/dam/role/PDFs/secure/safetravel.pdf&isCQPage=true

Hi There,
i need help to write an sql script to return values from different positions within the example string below:
#12345678.#98B9876.#123456
i want values from positions 2-8 and concatenate with values in positions 11-13.

Hi I am having an issue with below syntax:
When I run below query 

Hi,
I have below variables in my result set. These are result of an substring function.

734746/Chi
1435919?c=
762799?c=E
710632?c=E
20784/T23

I want to get only the numeric values before first delimiter(/, ?). So the result set should look like this.

Hi,
Do we have some different approch to get last character of a string ( Fix length/ Variable length both ) apart from using substr ?
Thanks
Nagendra

SUBSTING function is giving error in Teradata Studio which was working fine in Teradata SQL Assistant.
My Query is like this : SEL SUBSTRING('ABC',1,2)
I do not want to use SUBSTR instead of SUBSTRING as it involves making changes in a lot of Queries. Please suggest a work around for this issue.
 
Thanks!
Anirudh

I'm looking to split a string in Teradata.

 

The table might look something like this.

    

    column1
    hello:goodbye:afternoon

I'm trying to use SUBSTRING and INSTR to extract specific words.  So, say I want to select "goodbye". I'm trying the following query. 

hi
 
have few questions reg substr & substring
 
a. which one is ANSI compliant?
b. whats th difference btween two?
c. which one should be used?
 
Natasha

I have a reallt long string that I am trying to substring a specific piece of data for.
 
The column looks like this "http://www.sears.com/lawn-garden-snow-removal-equipment-snow-plows/b-1101194?sid=ISx20070515x00001d&psid=18x813487&knshCrid={AdId}&k_clickID=_kenshoo_click"
I built a table with the query below to test:

Hello,

When I execute a query using the SUBSTRING function, it executes fine in SQL Assistant but when I port it over to a macro it errors out:

"6758: Invalid Time"

Here's a simple setup to see what I mean:

DROP TABLE FP_BUSHOUR_REF;

CREATE SET TABLE FP_BUSHOUR_REF
(
FixedperiodId DECIMAL(10,0) NOT NULL,
Bushour SMALLINT,
Fp_Num SMALLINT,
Fp_start VARCHAR(20),
Fp_End VARCHAR(20))
UNIQUE PRIMARY INDEX ( FixedperiodId );

INSERT INTO fp_bushour_ref (96,18,73,'18:00','18:14:59');

Hi,

Is there any function to find the number of occurences of a particular substring within a string in teradata?