separate the content of field
-
Your table is in a mess, there is no fixed structure at all. The only way out is to do a manual clean up, and before that do remember to backup a copy of the original table. You must at least put in place some structure, say 'name', 'address', 'phone' that is comma separated and in fixed order and fixed number. Only then, you can use my solution to split and insert them into a new table. Work hard.
can I use length of field?because the length of fields containing a sequence string is very more than phone number,and fields their length is less than phone number is other type information. I think with this way,problem solve but I don't know code.
-
Sorry.
No need to apologize - you weren't to know! :laugh:
Never underestimate the power of stupid things in large numbers --- Serious Sam
-
Assuming your field values is comma separated and is of fixed number, check out this example at sql fiddle. It spilts the multiple-value field and insert them into a new table with separate fields. Adapt it to suit your need.
thx for your link.
-
can I use length of field?because the length of fields containing a sequence string is very more than phone number,and fields their length is less than phone number is other type information. I think with this way,problem solve but I don't know code.
I suggest you read this to learn how to manipulate string in sql: T-SQL: RIGHT, LEFT, SUBSTRING and CHARINDEX Functions. Good luck.
-
I suggest you read this to learn how to manipulate string in sql: T-SQL: RIGHT, LEFT, SUBSTRING and CHARINDEX Functions. Good luck.
Can you help me further?
-
Can you help me further?
The real learning comes from doing it yourself. No effort no gain. Have confidence in yourself. If you still encounter problems after trying, then come back to post your problems in the quick answer section.
-
The real learning comes from doing it yourself. No effort no gain. Have confidence in yourself. If you still encounter problems after trying, then come back to post your problems in the quick answer section.
I used this link,but I am having trouble.because some records is exception.
-
The real learning comes from doing it yourself. No effort no gain. Have confidence in yourself. If you still encounter problems after trying, then come back to post your problems in the quick answer section.
can I use SQl-CLR for this problem?
-
I have a table that it has a field with nvarchar datataype. the content of this field Containing different of information such as phone number,address and ... how do I grouping it In various fields?
is there the C# code for this problem?
-
is there the C# code for this problem?