SQL Query to Add '

I have a specific column called “GWEB” in SQL table which contain some long numbers (0900000000000000000000035520329).

When I copy and paste data table from SQL to excel - the GWEB column was pasted with value like this “9E+29”

If we insert infront of the 0900000000000000000000035520329. Then I can paste in excel with correct number.

Therefore when I try to add into my SQL query it gives me below error
Error:
.Net SqlClient Data Provider : Unclosed quotation mark after the character string ‘1234567890)’.
Incorrect syntax near ‘1234567890)’.

SQL Query:
“INSERT INTO [UFT].[dbo].[Shipment_Correction_Log] ([GWEBFolderID]) VALUES (’” + dd + “)”

Do anyone have any Idea how should i mitigate this?

@Serran_Neru follow below link

1 Like

Data type of table column “GWEB” is number. If you try to insert something like '1234 into it it will fail because it is not a number value you are trying to insert.
Bottom line is you can not insert a text value to a number field in SQL database. What are you trying to achieve here is not clear. Pls explain,

Thanks mate