Put something like this in a query. The String function will pad out to 20
characters with spaces. Just make sure that Field1 doesn't have any records
of over 20 characters as String doesn't work with negative numbers.
WithSpaces: Field1 & String(20-Len(Field1)," ")
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
"Marco" wrote:
Hi.
I need to merge several fields in a query and the fields that I have to
merge must have a specific lengh even if data that is in the field has not
that lengh.
Imagine:
Field1 must be the size of 20 chars but the data that is into has only 10
chars. When I'll merge this fiels in a query the size gonna be 10 instead of
20.
I have on the field size on table the lengh of 20 chars.
Re: Using part of a field ... See the article "Finding and replacing characters using wildcards" at: ... AS400 SQL may have a different way of doing ... called i.dsn, containing the followiing text: ... sort of thing in a query.... (microsoft.public.word.mailmerge.fields)
Re: Export to Ascii ...characters in a calculated field when you export a query. ... Modify your query to append its output to the temporary table; ..."John Nurick" wrote: ... that instead of concatenating with a delimiter it concatenates a fixed ... (microsoft.public.access.externaldata)
Re: SQL too long? ... I haven't done a thorough analysis here, but I suspect that the number of characters needed to express the SQL may not be as important as the number of aggregate functions like Sumand Countthat you invoke along the way. ... Although what you now have may be correct, assuming no simian behavior on the part of Access, splitting up the Query may also make it easier to debug if you later encounter any questions concerning its correctness, or if you need to revise it in some way. ... For example, in my copy of Access 2000, it says that the "Number of characters in an SQL statement" has a maximum value of "approximately 64,000", so you probably have some wiggle room there, even without using abbreviated aliases for some of the names. ... tblARTrn01.invno) INNER JOIN tblARMst01 ON tblDUPSFreight.invno = tblARMst01. ... (microsoft.public.access.queries)
Re: Problem with sql statement in VB ... I think that your admonition to "never use concatenation to build ... to build a second query or as parameters to a second query, ... > Of course you could use, but you never know what are special characters,... >> searching for SQL Injection Attack.... (microsoft.public.vb.database.ado)
Re: Subquery Confusion ... Then I got this crazy idea that an Array can only contain a maximum ... number of characters, ... Then I decide that maybe I'm completely wrong with my query,... it out of Excel VBA and spit it into Microsoft SQL Server Management ... (microsoft.public.excel.programming)