# Money Data Type Converted to String

**URL:** <https://forums.toadworld.com/t/money-data-type-converted-to-string/6270>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [August 4, 2010, 12:58pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270 "2010-08-04T12:58:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbsf](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nbsf](https://forums.toadworld.com/u/nbsf)\
**Post date:** [August 4, 2010, 12:58pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/1 "2010-08-04T12:58:48Z")

</div>

Hello, I am having trouble with my money data types. When my query produces results the money values are converted to a string data type; when exported to excel the results are exported to as text as well which makes the pivot tables function improperly. It doesn’t seem to be an issue with the INT data types.

See the attached screenshots.

Thanks

TDA datatype issue.doc (97.5 KB)

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [August 4, 2010, 1:29pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/2 "2010-08-04T13:29:36Z")

</div>

I tried this in TDA 2.6.1 and the money type is assigned to money column. It exports as general with no formatting.See screenshot. What version are you using?  
 ![Curency.png](https://global.discourse-cdn.com/quest/original/2X/6/635d4a7651328e7fc63cb84f53362d7b253d71a1.png)

---

<div class="post-metadata">

**Author:** ![nbsf](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nbsf](https://forums.toadworld.com/u/nbsf)\
**Post date:** [August 4, 2010, 1:47pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/3 "2010-08-04T13:47:19Z")

</div>

I’m using 2.5.1

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [August 4, 2010, 2:19pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/4 "2010-08-04T14:19:47Z")

</div>

I am using money type but not your precision value. Can you send me your table ddl. Just copy from the script tab in database browser.

Also, what are your regional settings?

I do think we have an issue here I just need to replicate on my end.

Debbie

---

<div class="post-metadata">

**Author:** ![nbsf](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nbsf](https://forums.toadworld.com/u/nbsf)\
**Post date:** [August 4, 2010, 7:52pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/5 "2010-08-04T19:52:43Z")

</div>

Unfortunately, I’m using a read only version and do not have the ability to provide you with the info you are requesting. Any other options? I working on getting upgraded to the newer version. Hopefully that will solve my problem.

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [August 4, 2010, 10:53pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/6 "2010-08-04T22:53:27Z")

</div>

From the Object Palette, right click and generate SQL | To Clipboard | Creation Script. That should also create the DDL. If not, I can work on this in the morning. Let me know.

Debbie

---

<div class="post-metadata">

**Author:** ![nbsf](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nbsf](https://forums.toadworld.com/u/nbsf)\
**Post date:** [August 5, 2010, 11:36am UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/7 "2010-08-05T11:36:24Z")

</div>

Sorry, I didn’t understand at first, As you probably guessed I’m new to TDA. Here is DDL for the table.

CREATE TABLE “MONTHEND201007”.dbo.LOAN(  
CUSTOMERID char(10) ,  
TYPE int ,  
OPENDATE datetime ,  
CLOSEDATE datetime ,  
APPROVALCODE int ,  
PAYMENT money(19, 4) ,  
LASTPAYMENTDATE datetime ,  
TERM int ,  
DUEDATE datetime ,  
INTERESTYTD money(19, 4) ,  
INTERESTLASTYEAR money(19, 4) ,  
INTERESTFROMOPEN money(19, 4) ,  
INTERESTRATE decimal(6, 3) ,  
BALANCE money(19, 4) ,  
ORIGINALBALANCE money(19, 4) ,  
CREDITLIMIT money(19, 4) ,  
DESCRIPTION varchar(40) ,  
MATURITYDATE datetime ,  
AVAILABLECREDIT money(19, 4)  
);

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [August 5, 2010, 5:09pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/8 "2010-08-05T17:09:05Z")

</div>

Okay. I think I see what is happening. You must be using ODBC to connect to SQL Server. There seems to be an error where we are giving percision to the money type. Money should never be represented as money(19,4).

You need to use the native SQL Server type. See screenshot. (Hope you are not using freeware as this is only available in commerical versions). If you are download a trial of TDA and it will work.

Also, in the current code base we are working in the export works ok with ODBC but the display is still wrong. I entered CR76,724 to fix the display and DDL generation.

Debbie

 ![DontuseODBC.png](https://global.discourse-cdn.com/quest/original/2X/0/015be33b2a4aa83aef61e871b75a1d9542d91c25.png)

---

<div class="post-metadata">

**Author:** ![nbsf](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nbsf](https://forums.toadworld.com/u/nbsf)\
**Post date:** [August 5, 2010, 6:14pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/9 "2010-08-05T18:14:47Z")

</div>

That was it. Thank you.

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [August 5, 2010, 6:34pm UTC](https://forums.toadworld.com/t/money-data-type-converted-to-string/6270/10 "2010-08-05T18:34:26Z")

</div>

Good to hear.
