Results 1 to 2 of 2
  1. #1
    sona is offline Novice
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    1

    sum by a query- force feild type in a make table query

    Dear All,

    I have an input file as seen in the attachment. What i want to do is sum the values in two columns together.

    Right now i have used query1. however it is not giving the correct output. I have made a table for the correct output named as 'required output'.



    What i am guessing is that it is not summing properly since the data in the 'input' table is in text form.

    Maybe i can use a make table query where i store the data of input as it is again but by forcefully defining the fields as number. Can you please tell me how to do this
    Attached Files Attached Files

  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Perhaps :

    Code:
    SELECT 
    CInt([shoes]) AS TheShoes, 
    CInt([clothes]) AS TheClothes 
    INTO 
    newTable
    FROM 
    tblinput;
    Thanks

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

Similar Threads

  1. Replies: 3
    Last Post: 12-09-2011, 11:55 AM
  2. change data type in make table query
    By jgelpi16 in forum Queries
    Replies: 2
    Last Post: 01-26-2011, 09:37 AM
  3. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  4. Replies: 4
    Last Post: 04-09-2010, 02:16 AM
  5. Replies: 2
    Last Post: 03-14-2010, 07:27 PM

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