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:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 1:13 PM
To: [EMAIL PROTECTED]
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.

Reply via email to