Results 1 to 1 of 1
  1. #1
    SoSubaruMe is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    1

    Export to .txt Issue: Field Returning 2 Decimals

    Hello all,



    I've done extensive searches on this issue I'm having. I'm attempting to export a table generated from a query (see query below) as a pipe-delimited text file. However, one of my fields is exporting with two decimal places no matter what I try (Format, CLng, etc.). I have two numerical (whole number) fields, one for student ID (STUDENT_ID in red) and another for their password (PASSWRD in green), which is their student number. The PASSWRD field exports just fine as a whole number, but the STUDENT_ID exports as xxxx.00. The fields are both of datatype NUMBER (Long Integer, 0 decimals) in the target table (t_USERS), and the fields are both of datatype NUMBER (Long Integer, 0 decimals) in the source tables. Hopefully I've provided enough detail.

    SELECT * INTO t_USERS
    FROM (SELECT DISTINCT "NONE" AS SYSTEM_ROLE, "Faculty" AS INSTITUTION_ROLE, "SyStaff_" & [SYSTAFFID] AS EXTERNAL_PERSON_KEY, t_PortalAccounts_Staff.USERNAME AS USER_ID, t_PortalAccounts_Staff.SYSTAFFID AS PASSWD, t_PortalAccounts_Staff.FIRSTNAME, t_PortalAccounts_Staff.LASTNAME, t_PortalAccounts_Staff.EMAIL, "" AS COMPANY, t_PortalAccounts_Staff.SYSTAFFID AS STUDENT_ID
    FROM t_PortalAccounts_Staff

    UNION ALL
    SELECT DISTINCT "NONE" AS SYSTEM_ROLE, "Student" AS INSTITUTION_ROLE, "SyStudent_" & [SYSTUDENTID] AS EXTERNAL_PERSON_KEY, t_PortalAccounts_Student.[LMS USERNAME] AS USER_ID, t_PortalAccounts_Student.STUNUM AS PASSWD, t_PortalAccounts_Student.FIRSTNAME, t_PortalAccounts_Student.LASTNAME, t_PortalAccounts_Student.EMAIL, t_PortalAccounts_Student.[LEARNER SERVICES ADVISOR] AS COMPANY, t_PortalAccounts_Student.SYSTUDENTID AS STUDENT_ID
    FROM t_PortalAccounts_Student) AS [%$##@_Alias];

    Any ideas on how to resolve this issue?

    Thank you in advance!
    Lauren

    ****EDIT: Issue resolved. I was using a Saved Export, which I deleted and recreated. For whatever reason, that fixed the issue.
    Last edited by SoSubaruMe; 02-27-2012 at 01:31 PM. Reason: Solved

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Blank Field returning #Error
    By imintrouble in forum Access
    Replies: 8
    Last Post: 12-09-2011, 03:00 PM
  2. Export query issue
    By Shaba in forum Queries
    Replies: 2
    Last Post: 10-20-2011, 09:20 PM
  3. Returning only the last number in a field
    By stanley721 in forum Queries
    Replies: 6
    Last Post: 03-07-2011, 10:37 AM
  4. Round Up/Down 4 Decimals to 2
    By newbie in forum Access
    Replies: 6
    Last Post: 10-18-2010, 02:58 PM
  5. Replies: 12
    Last Post: 10-15-2010, 10:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums