ADSM-L

[ADSM-L] How to prevent leading spaces in SQL output

2017-01-25 04:03:00
Subject: [ADSM-L] How to prevent leading spaces in SQL output
From: "Loon, Eric van (ITOPT3) - KLM" <Eric-van.Loon AT KLM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 25 Jan 2017 09:01:51 +0000
Hi TSM-ers!
I'm executing the following command in a script:

/usr/bin/dsmadmc -se=$INSTANCE -id=$ID -password=$PASSWORD -dataonly=yes 
"SELECT CAST(float(used_space_mb)*100/total_space_mb AS DECIMAL(4,2)) FROM log"

The result is this (without quotes):

'      0.49'

I'm looking for a way to remove the leading spaces, so the output is just 
'0.49'. I know I can do it in the script itself, but I'm just wondering if 
there is a way to remove all formatting through the SQL statement itself.
Thanks for any help in advance!
Kind regards,
Eric van Loon
Air France/KLM Storage Engineering

********************************************************
For information, services and offers, please visit our web site: 
http://www.klm.com. This e-mail and any attachment may contain confidential and 
privileged material intended for the addressee only. If you are not the 
addressee, you are notified that no part of the e-mail or any attachment may be 
disclosed, copied or distributed, and that any other action related to this 
e-mail or attachment is strictly prohibited, and may be unlawful. If you have 
received this e-mail by error, please notify the sender immediately by return 
e-mail, and delete this message.

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
employees shall not be liable for the incorrect or incomplete transmission of 
this e-mail or any attachments, nor responsible for any delay in receipt.
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
Airlines) is registered in Amstelveen, The Netherlands, with registered number 
33014286
********************************************************

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