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.
Author |
Topic |
srinivas.alwala
Starting Member
30 Posts |
Posted - 2008-12-15 : 07:22:59
|
Hi,I am exporting data of sql to csv format.When I execute the result of sql database in query analyser it displays data properly while when results in Grid mode. But when I execute the same data when results in Text mode the data in between is moving to new line this making the result export to csv in invalid format as in query analyser.Any help would be appreciated.Kindly find the results in both the modes:1. When results in Grid mode:500-2343183 2008-12-02 00:00:00 2008-12-02 00:00:00 2008-12-02 00:00:00 2008-12-12 00:00:00 C Annually 25000.0000 25000.0000 44934 KARVY VENUE HASSAN ARAVIND IYER M N RAMESH VENKATESH NAIDU G C.A.B. ANTHONY THOMAS ULELA 250000.0000 SHANTHIGRAM ROAD GADENAHALLI HASSAN 573201 KARNATAKA NULL 573201 09740798744 08172-258069 .0000 .0000 .0000 Mysore - Mysore Trade Center 224008 224000 2700002. When results in Text mode:Policy_No Capture_Dt Submit_Dt Issue_Dt Effective_Dt Policy_Status Pay_Mode Premium NBI Emp_Code Emp_Name MOA_Name MOM_Name RSM_Name Channel_Name Policy_Holder Product_Code Sum_Assured Policy_Holder_Add1 Policy_Holder_Add2 Policy_Holder_Add3 Policy_Holder_Add4 Policy_Holder_Pin_Code Policy_Holder_Tel1 Policy_Holder_Tel2 CollPremNB CollPrem1st CollPrem2nd Policy_Source Location_Name MOA_Unit_Code MOM_Unit_Code RSM_Unit_Code ------------ ------------------------------------------------------ ------------------------------------------------------ ------------------------------------------------------ ------------------------------------------------------ ------------- ----------- --------------------- --------------------- ----------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------------------------ -------------------------------------------------- ------------ --------------------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- ---------------------- ------------------ ------------------ --------------------- --------------------- --------------------- ------------------------------ -------------------------------------------------- ------------- ------------- ------------- 500-2343183 2008-12-02 00:00:00 2008-12-02 00:00:00 2008-12-02 00:00:00 2008-12-12 00:00:00 C Annually 25000.0000 25000.0000 44934 KARVY VENUE HASSAN ARAVIND IYER M N RAMESH VENKATESH NAIDU G C.A.B. ANTHONY THOMAS ULELA 250000.0000 SHANTHIGRAM ROAD GADENAHALLI HASSAN 573201 KARNATAKA NULL 573201 09740798744 08172-258069 .0000 .0000 .0000 Mysore - Mysore Trade Center 224008 224000 270000 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-15 : 09:11:54
|
that means you have some carriage returns coming in result. try replacing them using REPLACE() |
 |
|
srinivas.alwala
Starting Member
30 Posts |
Posted - 2008-12-19 : 06:36:18
|
Tried replcace function to remove the comma with blank as replace(exp,',',''). I am still getting the same result.Kindly suggest to remove the same. |
 |
|
|
|
|