Export

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ANDRESUK

    #1

    Export

    Everyone,

    I'm trying to export a table containing numeric fields with formats
    such as "00000000" which would return the value with some leading
    zeros. It works fine in the table as it is displayed as I want, the
    problem is that I lose the formats when I try to export the table to a
    TXT file; e.g. in the table the numeric field is displayed as 00034569
    but it exports as 34569.

    I know I can convert the numeric field to "Text" with the appropriate
    formatting and that way they would export with the leading zeros, but
    the problem is that I need them to be "Numeric" as when exporting to
    the TXT (Fixed Width) file I need the "Numeric" fields to be aligned to
    the right, don't ask why because I don't know or can do anything
    about it.

    Any help would be highly appreciated.
    Thanks
    GAVO.

  • MGFoster

    #2
    Re: Export

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Use a query to export the data. In the query use the Format() function
    to add leading zeros to the "numeric" data:

    SELECT Format(number_c olumn,"00000000 "), ...

    --
    MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
    Oakland, CA (USA)

    -----BEGIN PGP SIGNATURE-----
    Version: PGP for Personal Privacy 5.0
    Charset: noconv

    iQA/AwUBRAdK0oechKq OuFEgEQILlwCg5h VaVE0K/kF+JjypGTJybCaN n9cAn3fb
    lDkcbqoJgkT9VOi B3CjKNrEK
    =C8Eq
    -----END PGP SIGNATURE-----


    ANDRESUK wrote:[color=blue]
    > Everyone,
    >
    > I'm trying to export a table containing numeric fields with formats
    > such as "00000000" which would return the value with some leading
    > zeros. It works fine in the table as it is displayed as I want, the
    > problem is that I lose the formats when I try to export the table to a
    > TXT file; e.g. in the table the numeric field is displayed as 00034569
    > but it exports as 34569.
    >
    > I know I can convert the numeric field to "Text" with the appropriate
    > formatting and that way they would export with the leading zeros, but
    > the problem is that I need them to be "Numeric" as when exporting to
    > the TXT (Fixed Width) file I need the "Numeric" fields to be aligned to
    > the right, don't ask why because I don't know or can do anything
    > about it.[/color]

    Comment

    Working...