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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 bcp out from table with money datatype

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-11-17 : 07:39:20
Sapna writes "Hi,

I am doing a bcp out from a table, which has a field with money datatype. I specify the format file for this field as
1 SYBCHAR 0 15 "" 1 price
But the bcp out data doesnot have the comma seperator at the thousands place.

How do I get the commas as well when I do a bcp out???
Any help would be very much appreciated.

Thanks in advance"

nr
SQLTeam MVY

12543 Posts

Posted - 2003-11-17 : 12:56:53
You can use a query for the bcp and convert the data to character.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-11-17 : 13:18:30
It's really a presentation layer issue...


USE Northwind
GO

CREATE TABLE myTable99 (Col1 money)
GO

INSERT INTO myTable99 (Col1)
SELECT 123456789 UNION ALL
SELECT 123

SELECT CONVERT(varchar(15),Col1,1) FROM myTable99

DROP TABLE myTable99
GO





Brett

8-)
Go to Top of Page
   

- Advertisement -