Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 problem with cast statement

Author  Topic 

aisyah_mohamad
Starting Member

3 Posts

Posted - 2011-07-19 : 04:32:23
can anybody tell me what's missing from my sql statement?

SELECT journal, voucher, voucherdate, currency, createdBy, createdtime, modifiedby, modifiedtime, transactionid, txt, (CAST(amountcurrency as double)) as "amountcurrency", (CAST(amountrm as double)) as "amountrm"
into carse_je_double
FROM `carsem_je`

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-07-19 : 04:40:06
Can you tell us what your problem is?
btw. is this SQL Server or MySQL? Because this is a MS SQL Server forum...and this `carsem_je` looks like MySQL...


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

aisyah_mohamad
Starting Member

3 Posts

Posted - 2011-07-19 : 04:50:04
carsem_je is the table name.

basically i need to convert data in column amountcurrency and amountrm as double in order to do some data analysis (eg: find transactions with amount >100k ending with 999), hence i'm transfering the data into a new table (carsem_je_double).
Go to Top of Page
   

- Advertisement -