question

vorets avatar image
vorets asked

how to separate this by table in sql


name,age,gender,create_time
joey dy round,36,"m",2012-05-07 22:23:32
jess britt,25,"m",2012-05-08 04:40:24
anna isabela,33,"f",2012-05-08 04:37:56
sandra ly,32,"f",2012-05-08 00:01:10
delimited-string
5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

where is the data ? text file ? table ?
1 Like 1 ·
Just asking a question and providing data does not help folks much. What is your desired output or end result you are looking for? What are you trying to do with the data (move it to another source, another table, seperate files, etc)?
1 Like 1 ·
please help i dont want to transfer them 1 by 1
0 Likes 0 ·
@vorets please spend some time considering if you can edit the information you have provided to make it into a concise and easily understood question. Make what changes you can to make it clear wheat you situation is, what problem you are having and what you want to achieve. That way we can consider your scenario and give advice and guidance to get you completing your task
0 Likes 0 ·
File is .txt using notepad and i want to add the string to my phpadmin. I dont have a database now cuz i dont know how to split them on a table.
0 Likes 0 ·
ThomasRushton avatar image
ThomasRushton answered
You could do worse than checking the documentation for [BULK INSERT][1]... [1]: http://msdn.microsoft.com/en-us/library/ms188365.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

TimothyAWiseman avatar image
TimothyAWiseman answered
Since you said this is a .txt and it looks like standard comma separate values, there are a dozen and one ways to bring in comma separate values into SQL Server. SSIS is probably one of the easiest, but Bulk Insert as Thomas suggested is probably one of the fastest, and BCP is a fine third option. There are many, many others but I would use one of those three for the vast majority of cases and go to other options only if there were other factors that pointed me in another direction.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.