By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,806 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,806 IT Pros & Developers. It's quick & easy.

how to set data type to certain field in a Make Table

P: 56
Hi all,
I have this querry, when I run the query, it makes the table name "tmaCustomer", but I would like to set the field "TotalCompliant" as Text, instead of Number, any idea?
When the table has created after running the query, the field "TotalCompliant" was automatically set to "Number".
Expand|Select|Wrap|Line Numbers
  1. SELECT [qrycustomer #3].Facility,
  2.        1 AS [Order],
  3.        Format([MonthYear],"mmmm") AS [Month],
  4.        DatePart("yyyy",[MonthYear]) AS [Year],
  5.        "Compliant Observations" AS Items,
  6.        [qryCustomer #3].TotalCompliant AS Result INTO tmaCustomer
  7. FROM [qryCustomer #3];
thanks!

Bluemoon
Dec 30 '09 #1

✓ answered by ajalwaysus

Try:

Expand|Select|Wrap|Line Numbers
  1. SELECT [qrycustomer #3].Facility
  2. , 1 AS [Order], Format([MonthYear],"mmmm") AS [Month]
  3. , DatePart("yyyy",[MonthYear]) AS [Year]
  4. , "Compliant Observations" AS Items
  5. , CStr([qryCustomer #3].TotalCompliant) AS Result 
  6. INTO tmaCustomer
  7. FROM [qryCustomer #3];
and if this doesn't work, please post qryCustomer #3 code.

-AJ

Share this Question
Share on Google+
2 Replies


Expert 100+
P: 266
Try:

Expand|Select|Wrap|Line Numbers
  1. SELECT [qrycustomer #3].Facility
  2. , 1 AS [Order], Format([MonthYear],"mmmm") AS [Month]
  3. , DatePart("yyyy",[MonthYear]) AS [Year]
  4. , "Compliant Observations" AS Items
  5. , CStr([qryCustomer #3].TotalCompliant) AS Result 
  6. INTO tmaCustomer
  7. FROM [qryCustomer #3];
and if this doesn't work, please post qryCustomer #3 code.

-AJ
Dec 30 '09 #2

P: 56
it worked very well.
thank you so much for your help.
Have a happy new year.

bluemoon
Dec 30 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.