SQL Server 2008, Numeric Data Type & NULL Values
Posted on 2011-09-06
Please forgive me as I am completly new to SQL Server. I am importing a CSV file from an e-commerce site into a SQL Server 2008 table using a dtsx package I created in BIDS. I established some of the columns within the table, such as "price" and "special price," as Numeric (18, 2) data types. However, within the spreadsheet that I am importing "special price" only has a value if the item is on sale; otherwise, it is empty. Unfortunitly, when it is imported into SQL all of the NULL values for "special price" are being populated with a zero.
This is causing me some problems because I am manipulating the data within the table, exporting a csv file and then uploading the information back into the e-commerce store. The e-commerce store interprets the zero vaule within the "special price" field as the item being on sale for a price of $0.00. How can I get SQL to retain the value of NULL during the import process for my fields with a Numeric data type?