Searching string in LogonSource ?

Database

Searching string in LogonSource ?

Hi all
Please help...,
These are some logonsource string examples out of which I need to extract only the 4th last word (For example here YZIF7295, FWPG8206, ADM-MM4 or ADMMDORD).
(Maybe with the INDEX or POSITION functions...with the SUBSTRING function)
(I want to obtain the string after the third space from the end.)

(TCP/IP) 0AAE IPA AAA.BBB.CCC.NET 3956 YZIF7295 QUERYMAN 01 LSS
(TCP/IP) 094D IPW AAA.BBB.CCC.NET 3024 FWPG8206 MMC 01 LSS
(TCP/IP) 0E9D IPY AAA.BBB.CCC.NET 7076 ADM-MM4 DTSRUN 01 LSS
(TCP/IP) 89A7 IPZ AA.BB.CCC.NET 622800 ADMMDORD DB-UNLOAD.IMPL 01 LSS

Thanks in advance...

Didier
1 REPLY
Teradata Employee

Re: Searching string in LogonSource ?

Hello,

Doing that in SQL may be difficult. Doing that in UDF will be simple and easy, if you have experience in UDFs.

You can have a similar sort of UDF as suggested at: http://www.teradata.com/teradataforum/Topic11751-9-1.aspx

HTH.

Regards,

Adeel