SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Kindly suggest a data type
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqldbpro
Starting Member

11 Posts

Posted - 05/03/2013 :  05:19:38  Show Profile  Reply with Quote
Hi all, I am a newbie to SQL. I have created a database, within which i need to create a table. One of the columns in the table will hold lot of data which could be equivalent to approx two complete A4 sized pages in MS Word.

Contents of Column/Data:
Numbers,Alphabets,Special characters, website link

The datatype should not be one which is likely to get rid of for at least a decade.


Thanks

UnemployedInOz
Yak Posting Veteran

Australia
54 Posts

Posted - 05/03/2013 :  05:24:54  Show Profile  Reply with Quote
nvarchar(max)
Go to Top of Page

sqldbpro
Starting Member

11 Posts

Posted - 05/03/2013 :  05:28:55  Show Profile  Reply with Quote
quote:
Originally posted by UnemployedInOz

nvarchar(max)



Thanks
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30116 Posts

Posted - 05/04/2013 :  13:00:06  Show Profile  Visit SwePeso's Homepage  Reply with Quote
BINARY(MAX), since the data can hold control characters which is not representable in NVARCHAR.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

sqldbpro
Starting Member

11 Posts

Posted - 05/09/2013 :  02:35:37  Show Profile  Reply with Quote
Thanks
Go to Top of Page

Transact Charlie
Flowing Fount of Yak Knowledge

United Kingdom
3451 Posts

Posted - 05/09/2013 :  09:50:43  Show Profile  Visit Transact Charlie's Homepage  Reply with Quote
you might be better off holding a link to the original document in there.

Unless you need to query the information (in which case binary won't help you out very much).

This might be a better job for a document database such as solr / elasticsearch assuming you want to search on content inside the documents.

What's the use case for this store?


Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
http://nosqlsolution.blogspot.co.uk/

Edited by - Transact Charlie on 05/09/2013 09:51:21
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000