Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

How to get MakeTable query to create Currency fields?

Hello - I would like the table resulting from a summary MakeTable query to create the amount fields with the Currency data type, rather than Double.

(The MakeTable query is based on a cross-tab query, so I can't depend on the number of columns. Otherwise, I'd use an Append query into a table that already has Currency fields.

Is there a way to do this?
0
mlagrange
Asked:
mlagrange
  • 2
  • 2
1 Solution
 
mlagrangeAuthor Commented:
I thought I could work up a Data Definition query to change the data types, but I got the impression from looking for examples that you can't change data type with ALTER. Is that right?
0
 
Patrick MatthewsCommented:
It would be useful if you could post a (sanitized) sample database.

Off the top of my head, I would try modifying the cross-tab query so that instead of taking Sum([ColumnName]) it takes Sum(CCur([ColumnName]))...
0
 
Eric ShermanAccountant/DeveloperCommented:
<<<<<I thought I could work up a Data Definition query to change the data types, but I got the impression from looking for examples that you can't change data type with ALTER. Is that right?>>>>>


ALTER TABLE table_name MODIFY column_name column_type;


ET
0
 
Eric ShermanAccountant/DeveloperCommented:
Also, try this ...

ALTER TABLE [table_name] ALTER COLUMN [column_name] CURRENCY;


ET
0
 
mlagrangeAuthor Commented:
That's it!

Thanks
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now