473,473 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

QBE function for filling 11 digits

Hello,

I have been trying to come up with a IIF function to do the following
in a QBE grid:

If a number is 10 digits or less, then add leading zeros to fill up 11
spaces.
Examples:
1234567899 = 01234567899
02356 = 00000002356

If a number is 11, 12 or 13 digits, leave it alone.
Examples:
12345678991
645363736562
6475837645744

Any help would be greatly appreciated.

Thanks,
KP

Feb 3 '06 #1
2 1623
Kermit Piper wrote:
Hello,

I have been trying to come up with a IIF function to do the following
in a QBE grid:

If a number is 10 digits or less, then add leading zeros to fill up 11
spaces.
Examples:
1234567899 = 01234567899
02356 = 00000002356

If a number is 11, 12 or 13 digits, leave it alone.
Examples:
12345678991
645363736562
6475837645744

format(456789,string(11,"0"))

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Feb 3 '06 #2
Wow, that easy? Thanks, I'll give it a try.

Feb 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
10
by: Steve Goldman | last post by:
Hi, I am trying to come up with a way to develop all n-length permutations of a given list of values. The short function below seems to work, but I can't help thinking there's a better way. ...
2
by: | last post by:
OK: Purpose: Using user's input and 3 recursive functions, construct an hour glass figure. Main can only have user input, loops and function calls. Recursive function 1 takes input and displays...
6
by: Curley Q. | last post by:
Is there a std lib rounding function that will round a real to a given number of decimal places? Something like: double round_it(double number, int decimal_digits) pass 34.5678, 3 to it and it...
15
by: Michel Rouzic | last post by:
I tried making a function that would fill half of an array with random doubles that would go from -pi to +pi. Unfortunatly, all it ever returns is -pi. I haven't used an already existing random...
27
by: Luke Wu | last post by:
Is there a C function that returns the number of digits in an input int/long? example: numdigits(123) returns 3 numdigits(1232132) returns 7
6
by: karthi | last post by:
hi, I need user defined function that converts string to float in c. since the library function atof and strtod occupies large space in my processor memory I can't use it in my code. regards,...
19
by: Robbie Hatley | last post by:
For your enjoyment, a function that expresses any integer with absolute value less-than-or-equal-to nine quintillion in any base from 2 to 36. (For larger bases, you could expand the "digit"...
5
by: aaragon | last post by:
Hi everyone, I wrote a very simple function to try to understand the casting of variables in C++. The function is function foo() { std::vector<inttest(100); randomize(test); unsigned long...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.