Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Enhancement Requests and Suggestions » View Thread |
Messages 1 to 3 of 3 total |
Reuse calculated columns |
Wed, Feb 3 2010 2:05 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Its probably in the stack somewhere but if it isn't please add. Starting work on working out LOB slack I have two queries so far
SELECT CEIL(Length(_Encoded)/ 512) AS Blocks, Length(_Encoded) AS Bytes, (CEIL(Length(_Encoded)/ 512) * 512) AS Required, Length(_Encoded) - (CEIL(Length(_Encoded)/ 512) * 512) AS Slack, TRUNC(10000 *(Length(_Encoded) - (CEIL(Length(_Encoded)/ 512) * 512)) / Length(_Encoded)) / 100 AS Percentage FROM EMails SELECT SUM(CEIL(Length(_Encoded)/ 4096)) AS Blocks, SUM(Length(_Encoded)) AS Bytes, (SUM(CEIL(Length(_Encoded)/ 4096)) * 4096) AS Required, SUM(Length(_Encoded)) - SUM((CEIL(Length(_Encoded)/ 4096)) * 4096) AS Slack, TRUNC(10000 *(SUM(Length(_Encoded)) - (SUM(CEIL(Length(_Encoded)/ 4096)) * 4096)) / SUM(Length(_Encoded))) / 100 AS Percentage FROM EMails It would be so nice not to have to type the calculation again, and again, and again Roy Lambert |
Thu, Feb 4 2010 9:30 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Its probably in the stack somewhere but if it isn't please add. Starting work on working out LOB slack I have two queries so far >> Functions are your friend. I'll see what I can do... -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 4 2010 10:08 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>Functions are your friend. I thought of that, but if I can ever get it off the ground it will be a utility to be applied to any database so I don't want to have to go and functions into each one I want to check out. Roy Lambert |
This web page was last updated on Thursday, March 28, 2024 at 08:36 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |