-
import txt into sql
Hello.
I am a newbie in sql. I have a txt file like:
First name, Last Name
Name1, Lastname1
Name2, Lastname2
Name3, Lastname33
...
I would like to import this data into sql server into table with the following columns:
ID, first name, type, lastname
where ID should be function newid(); and type is some integer.
Thank you for your help !!!!
-
You can set default value to newsequentialid() for id column, set type to allow null. Then load data with either bcp or bulk insert, and handle type afterwards.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|