![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have one table and i m trying to export it to .CSV file. i do have NULL values in one of column of table so when i do export to csv file, it convert into single quote.. like following TABLE: col1 col2 test 1 NULL 2 test2 3 NULL 4 when i do export to csv file through, it converts NULL values into single quote, it export like following. 'test',1 '',2 'test2',3 '',4 can i know how can i avoid that single quote for NULL values, when i do export to csv file. Pls let me know. |
#3
| |||
| |||
|
|
It is not a single quote but an empty space surrounded by quotes look up coalesce in BOL use like coalesce(col1,'SomeValue') replace 'SomeValue' with the data you want "mvp" <mvp (AT) discussions (DOT) microsoft.com> wrote in message news:F912AC18-81D6-4CC5-95AF-E00D74802F0C (AT) microsoft (DOT) com... Hi, I have one table and i m trying to export it to .CSV file. i do have NULL values in one of column of table so when i do export to csv file, it convert into single quote.. like following TABLE: col1 col2 test 1 NULL 2 test2 3 NULL 4 when i do export to csv file through, it converts NULL values into single quote, it export like following. 'test',1 '',2 'test2',3 '',4 can i know how can i avoid that single quote for NULL values, when i do export to csv file. Pls let me know. |
#4
| |||
| |||
|
|
I do not understand what r u trying to say. i have read abt coalesce in BOL.. but not clear... I want something like following. TABLE: col1 col2 test 1 NULL 2 test2 3 NULL 4 when i export i do not want empty string in case of NULL in col1. so i want something like following. 'test',1 ,2 'test2',3 ,4 pls let me know. "Denis" wrote: It is not a single quote but an empty space surrounded by quotes look up coalesce in BOL use like coalesce(col1,'SomeValue') replace 'SomeValue' with the data you want "mvp" <mvp (AT) discussions (DOT) microsoft.com> wrote in message news:F912AC18-81D6-4CC5-95AF-E00D74802F0C (AT) microsoft (DOT) com... Hi, I have one table and i m trying to export it to .CSV file. i do have NULL values in one of column of table so when i do export to csv file, it convert into single quote.. like following TABLE: col1 col2 test 1 NULL 2 test2 3 NULL 4 when i do export to csv file through, it converts NULL values into single quote, it export like following. 'test',1 '',2 'test2',3 '',4 can i know how can i avoid that single quote for NULL values, when i do export to csv file. Pls let me know. |
![]() |
| Thread Tools | |
| Display Modes | |
| |