| Author |
Topic |
|
sravz
Starting Member
42 Posts |
Posted - 2011-10-04 : 11:36:21
|
| Hi Everyone,I am using SQLSERVER 2008,and I am trying to Insert data from x table in X database to y table in Y database.When I am exporting there is a CompanyName column with data type varchar(50),For a particular record the CompanyName is like this "C & C Corporation".So when the Insert statement is executed the particular record with CompanyName "C&C Corporation" is being Inserted as "C &C Corporation". How can I eliminate this kind of insertion of a data in the export.The Insert statement is INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL1, COL4, COL7 FROM TABLE1Please let me know,what can be done to resolve this issue.......Thanks,Sravz |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-04 : 11:38:28
|
| please show us whats current insert code. without that we wont be able to understand why its stuffing the extra space in between------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sravz
Starting Member
42 Posts |
Posted - 2011-10-04 : 12:07:08
|
quote: Originally posted by visakh16 please show us whats current insert code. without that we wont be able to understand why its stuffing the extra space in between------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Hi Vikhas,I just posted the changes with Insert statement.I just did the sample of my Insert instead of original statement.Thanks, Sravanthi |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-04 : 12:21:16
|
| that insert doesnt have a problem. i think you're applying some convertion on column------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
jassi.singh
Posting Yak Master
122 Posts |
Posted - 2011-10-05 : 03:04:13
|
| Please check query after removing any extra action that you are performing on the column. Check what result you getPlease mark answer as accepted if it helped you.Thanks,Jassi Singh |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-05 : 04:24:02
|
quote: Originally posted by jassi.singh Please check query after removing any extra action that you are performing on the column. Check what result you getPlease mark answer as accepted if it helped you.Thanks,Jassi Singh
why are you restating what others have already suggested?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sravz
Starting Member
42 Posts |
Posted - 2011-10-05 : 10:02:33
|
| Hey Visakh,JassiI looked at the query whether any conversions are done on the column nothing is done.Just a normal query which I published here.I tried it with an example data base it works good.I dont know y that data is doing that.any ways thanks for the help.Thanks and Regards,Sravz |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-05 : 10:45:32
|
quote: Originally posted by sravz Hey Visakh,JassiI looked at the query whether any conversions are done on the column nothing is done.Just a normal query which I published here.I tried it with an example data base it works good.I dont know y that data is doing that.any ways thanks for the help.Thanks and Regards,Sravz
is data send by some app?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sravz
Starting Member
42 Posts |
Posted - 2011-10-05 : 12:25:51
|
| It is done through Dot net Nuke website application.On the click of export data button on front end the data is being inserted from one table to another using the Insert statement specified above.I think it is because of Dot Net Nuke. |
 |
|
|
|