ADSM-L

Re: Select statements syntax: The Answer

2002-12-20 19:55:00
Subject: Re: Select statements syntax: The Answer
From: "Seay, Paul" <seay_pd AT NAPTHEON DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 20 Dec 2002 19:50:08 -0500
Try this on for size.

select node_name, cast(platform_name as char(16)) as "OS/Name  ",
cast(client_os_level as char(10)) as "OS/Level", cast (client_version as
char(1)) || '.' || cast(client_release as char(1)) || '.' || cast
(client_level as char(1)) || '.' || trim(cast(client_sublevel as char(2)))
as "Level" from nodes order by 2,4,1

Paul D. Seay, Jr.
Technical Specialist
Naptheon Inc.
757-688-8180


-----Original Message-----
From: Jolliff, Dale [mailto:xjolliff AT TI DOT COM]
Sent: Wednesday, December 18, 2002 1:13 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: 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>
  • Re: Select statements syntax: The Answer, Seay, Paul <=