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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Convert nvarchar to bigint

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-18 : 08:26:05
Mehran writes "Dear Madam or Sir,
I have made a big mistake and i use nvarchat type for storing a int value and also i use comma sign between each numbers!!! ,how i can convert my data to original form (bigint)?.
i need your help,please send me your answer.
thanks,
Mehran Ghanizadeh"

nr
SQLTeam MVY

12543 Posts

Posted - 2005-01-18 : 08:28:39
Do you mean a comma for the thousands separator?

convert(bigint,relace(fld,',',''))

If you alter the table to change the type of the column then you will waste space. Better to create a new table and replace the old.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -