Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
Formatting Text |
Mon, Sep 19 2011 10:37 PM | Permanent Link |
Alex Vastich | Hi,
I am creating an export file and therefore have fixed formats I have to adhere to. I am wondering what is the best way to handle these in DBISAM V3 SQL. Examples of a requirement is below: * Zero-filled formatted numeric with 2 decimal places characters eg if value is 17.5 need it to be output as 0001750 I have tried CAST etc without much success. Thanks Kindly Alex |
Tue, Sep 20 2011 3:16 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Alex
I don't know about V3 but for V4 select SUBSTRING('0000000000',1,10-LENGTH( CAST(ROUND(100*17.5123 ,0) AS VARCHAR(10))))+ CAST(ROUND(100*17.5123 ,0) AS VARCHAR(10)) from banda Its messy but it works. I used constants only because I use ElevateDB and couldn't remember where I had a decimal column in the DBISAM tables Roy Lambert [Team Elevate] |
Tue, Sep 20 2011 6:12 AM | Permanent Link |
Alex Vastich | Roy Lambert wrote:
Wow thanks Roy I'll give it a go. |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |