I need to create a new table include some sharepath (e.g. \\network\sharespace\test1), To avoid query results follow some blank spaces after the path(e.g. I cann't accept \\network\sharespace\test1__________like this),I need to set its datatype to match the path length. How could I do? could anybody help to to set this?

link|improve this question

You might get better answers if people know what SQL server you're using. – womble Jul 10 '11 at 5:32
feedback

2 Answers

up vote 2 down vote accepted

Does your language lack a chomp function?

You can use the VARCHAR type to produce a string field of a given length; however, unless your sharepaths are all going to be the same length, you'll still end up with the same problem, so it's time to return to chomp.

link|improve this answer
Thank you very much – pansal Jul 10 '11 at 7:27
feedback

SQL 101 for beginners: use a variable length data type (varchar). Then go on and read the documentation about all data types your particular sql server language dialect supports.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.