creation of userid - excel

As per the requirement, we are maintaning all the student details in excel sheet and based on their firstname and lastname and surname comibation we need to create user id and import into sqlserver table. We are maintaning userid and password columns in a table called users. We should maintain unique ness in the user id generation based on the student names. How can we do this in sql server.

more ▼

asked May 10, 2012 at 01:01 PM in Default

Mohan gravatar image

324 39 56 60

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first
First, make sure that excel sheet records does not contain duplicates. I suggest you to use the auto numbering(Identity column) for userID this guarantees uniqueness and makes the clustered index key compact(as the userid is primary key)
more ▼

answered May 10, 2012 at 01:05 PM

Cyborg gravatar image

10.6k 36 40 45

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: May 10, 2012 at 01:01 PM

Seen: 576 times

Last Updated: May 10, 2012 at 01:05 PM