Fixed Length

Tech-Archive recommends: Speed Up your PC by fixing your registry



I have seven fields in my Table that need to be concatenated to create one
field used to create a 2D Barcode. Each of the seven fields has a fixed
length and the total lenght of all the fields has to be 100 characters.
These are the fields:

JobId (8 char)
Date (8 char)
RunNumber (2 char)
RecordNumber (8 char) - the key, starting with 1 and incrementing by 1 for
each record.
PageNumber (5 char)
PageCount (5 char)
Remaining (64 char)

I've done the Date field...that was the easy one...but how do I do the other
fields? The data will be entered and each field could use 1 character or all
the characters at the time it's entered. I need to have the remaining
character spaces fill in with zeros to the left of the data entered? Thanks
for the help in advance.
.



Relevant Pages

  • Re: heeeeeeeeeeeeeeeellllllllllllllppppppppppppppppppppp
    ... Why is using char* a bad thing and why using sprintf a bad thing to, ... can be up to MAX_PATH characters). ... LPSTR lpMsgBuf; ... MessageBox(NULL, lpMsgBuf, "GetLastError() for ...
    (microsoft.public.vc.mfc)
  • Re: heeeeeeeeeeeeeeeellllllllllllllppppppppppppppppppppp
    ... This means that if you develop the bad habit of using char * (left over ... It usually takes me five minutes to create a Unicode version of any of my apps, ... BOOL and bool are different data types. ... can be up to MAX_PATH characters). ...
    (microsoft.public.vc.mfc)
  • Re: Char and Varchar
    ... If the maximum length is short (<= 10 characters), ... maximum length, I also use CHAR. ... I use VARCHAR if long and short ...
    (microsoft.public.sqlserver.server)
  • Re: Char and Varchar
    ... If the maximum length is short (<= 10 characters), ... maximum length, I also use CHAR. ... I use VARCHAR if long and short ...
    (microsoft.public.sqlserver.programming)
  • Re: RfD: XCHAR wordset (for UTF-8 and alike)
    ... extended to work with xchars, ... >replacing one char with another. ... before-cursor part, even for fixed-width characters. ... So, should string words ...
    (comp.lang.forth)