No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
sqlBulk.WriteToServer(excelReader); string removeCharacter = "Select Replace('Price', '$ ', '') FROM #temp"; sqlCommand.CommandText = removeCharacter; I'm importing an excel file into sqlserver, I'm trying to remove the $ sign before I import the field into the database. The above code just does nothing $ sign still imports, also no error. | |
sqlBulk.ColumnMappings.Add(new SqlBulkCopyColumnMapping("[W.C.V]", "WCV")); i'm importing excel data into sql database, a column in the excel file has special characters (W.C.V) I cannot get the code to accept the special characters; I've tried "IMEX=1" in connection string without success. It is difficult to change the column in the excel, as it … | |
"UPDATE P SET Stock = T.Stock FROM prices P INNER JOIN #prices " + "T ON P.Avg = T.Avg AND P.Colour = T.Colour;" + " " + "INSERT INTO prices(Avg, Colour, Stock) SELECT T.Avg, T.Colour, T.Stock FROM #prices T " + "WHERE NOT EXISTS (SELECT 1 FROM prices P WHERE … |
The End.