PDA

View Full Version : SQL Server Export Specifications



Imdabaum
08-19-2010, 07:33 AM
So I am trying to export items in Unicode format with Vertical Bar delimeter from SQL Server. Is there a way to make the False/True values show up as 0 and -1?


****Sorry posted too soon a little more searching brought me a nice article on CASE function for T-SQL and think this might be the approach I need.

Imdabaum
08-23-2010, 02:02 PM
My option didn't work. It doesn't recognize the CASE functionality within the SELECT statement that I am wanting to export.

Does anyone have any insight on how the DTS works? I have three problems right now when I try to export data dumps to our developers who are trying to import the data into the new database product.
1. Often numerics are being exported with quotes around them.
2. Bit values (-1/0) are not displaying as 0 and -1. Instead I get an actual display of True/False. The import doesn't allow this as it expects numerals rather than strings.
3. Some integer fields are being exported with $ symbols in the front. This also causes problems with their import.

How do I modify the display of these fields when exported? I have seen some tutorials with SQL Server 2005, but haven't found anything to help with 2000.

stanl
08-24-2010, 05:11 AM
If you are using SQL server 2005 or greater, you should be using SSIS not DTS. How exactly is the data stored? Are you using Unicode Fields, or XML fields? Unless you data specifically has tabs, I would consider tab-delimited rather than bar-delimited. Just .02 Stan

Imdabaum
08-24-2010, 10:28 AM
Yes. That is why I asked about DTS because I am not using 2005 or greater.

Respective to my second post:
1. Decimals that show quotes are stored as integers (4)
2. True/False values are stored as Bit (-1/0)
3. Currency that shows $ is stored as numeric(8,4)

Aside from tab being a very rarely if not impossible value to exist in the system because tab would move them out of the data entry field rather than storing a character... what is the benefit of tab delimited if we can guarantee that our data doesn't contain pipes?

Thanks for the advice, I'll talk with the devlopers and see if we can start exporting with tab delimited.