October 26, 2012 at 11:45 am
hi
i am getting files which data i need to store in table.
i need help with data type
for character i am usign varchar , do i need to use nvarchar or varchar
please help
October 26, 2012 at 12:08 pm
harri.reddy (10/26/2012)
hii am getting files which data i need to store in table.
i need help with data type
for character i am usign varchar , do i need to use nvarchar or varchar
please help
Once again not enough information to provide an answer. Do you know what the difference between varchar and nvarchar is? Do you know what type of data your are going to store? There is no way anybody can help you because we don't know what type of text data you are storing.
The following link explains both datatypes.
http://msdn.microsoft.com/en-us/library/ms187752.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 26, 2012 at 1:45 pm
i am goiing to store data like xyd345
i dont knwo where to store in nvarchar or varchar
October 26, 2012 at 2:21 pm
harri.reddy (10/26/2012)
i am goiing to store data like xyd345i dont knwo where to store in nvarchar or varchar
Well if you only need to store characters from the standard ASCII group then varchar is fine. If you need to store characters from extended ASCII set then you need nvarchar.
Here a few examples. Notice the first character gets turned into a standard capital C but the Cyrillic and Arabic characters just get lost.
declare @nvarchar nvarchar(10) = N'C??'
declare @Varchar varchar(10) = N'C??'
select @nvarchar, @Varchar
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 27, 2012 at 4:23 am
What Type of Data,u need to store,
for Unicode using nvarchar .
non-unicode using varchar .
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply