ADSM-L

Re: Select statements syntax

2002-12-18 14:42:41
Subject: Re: Select statements syntax
From: "Jolliff, Dale" <xjolliff AT TI DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 18 Dec 2002 13:41:55 -0600
Thanks to you all, perfect answer!




-----Original Message-----
From: Cook, Dwight E [mailto:DWIGHT.E.COOK AT SAIC DOT COM]
Sent: Wednesday, December 18, 2002 12:52 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Select statements syntax


Way to go Paul !

example run against the occupancy table...

tsm: TSMSRV01>select cast((physical_mb) as varchar(10)) || cast((logical_mb)
              as varchar(10))  as "My Concat Field" from adsm.occupancy
My Concat Field
------------------
2521.282505.62
294.10293.42
0.030.03
0.000.00
6.146.12
0.240.24
294.77290.99
<... and on ...>

Dwight


-----Original Message-----
From: Paul van Dongen [mailto:paul AT VANGUARD-IT.COM DOT BR]
Sent: Wednesday, December 18, 2002 12:33 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: RES: Select statements syntax


Try something like this:

Select cast(client_version as char(1)) || cast(client_level as char(1)) from
nodes


--
Paul Gondim van Dongen
Engenheiro de Sistemas
MCSE
Tivoli Certified Consultant - Storage Manager
VANguard - Value Added Network guardians
http://www.vanguard-it.com.br
Fone: 55 81 3225-0353


-----Mensagem original-----
De: Jolliff, Dale [mailto:xjolliff AT TI DOT COM]
Enviada em: Wednesday, December 18, 2002 15:13
Para: ADSM-L AT VM.MARIST DOT EDU
Assunto: Select statements syntax


I need to create a select statement that concatenates numeric fields as text
-- I need to create a single text field from the four numeric fields in the
NODES table into a single text field.

Once I get the fields CAST as CHAR type, how do I concatenate them?

I tried SUBSTR but it pukes on too many arguments.

This works:

select substr(cast(client_version as char(1)),1,1) from nodes

This doesn't:

select substr(cast(client_version as char(1)),cast(client_release as
char(1)),1,1) from nodes

String concatenation is a basic function, I know it's there, I just can't
remember the function name.

<Prev in Thread] Current Thread [Next in Thread>