lohasavings.blogg.se

12345 abcd
12345 abcd















'Agentid,agentname, phone, email, address,state,country, = char(13), char(10))ĭeclare as int = charindex(char(10), as varchar(max) = as varchar(max) = ',', ' varchar(max), ') + ' varchar(max)' Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.Ĭheck an example: declare as varchar(max) = If you have extra questions about this answer, please click "Comment". If the answer is the right solution, please click " Accept Answer" and kindly upvote it. Or you could try to add row delimiter in your CSV file while downloading using SSIS as mentioned by Tom. While PATINDEX('% ,%', = PATINDEX('% ,%', into - 1)Īgentid,agentname, phone, email, address,state,country, it is not working after combining above and your original query, please provide your CSV file and table if possible so that we could reproduce your issue and proceed to fix this issue. Set phone, email, address,state,country, zip,ssn table Hi tried with below which is working from my side.

12345 abcd 12345 abcd

You cannot use the string_split() function because it does not return the position of the fields. 'Agentid,agentname, phone, email, address,state,country, as , INSERT INTO r.value('.','nvarchar(MAX)') as item ) RETURNS TABLE (id INT IDENTITY(1,1), val NVARCHAR(MAX)) This should work: CREATE FUNCTION NVARCHAR(100) Sql-server-general sql-server-transact-sql sql-server-integration-services īut when I copy and paste in csv or ssms I seeĪgentid,agentname, phone, email, address,state,country, zip,ssnġ,nick,56677700987, what I would like to do take /convert do some t SQL magic with function and insert this same row into a new readable table( as 1 row as column and then all as rows) I was able to dump that column to SQL SERVER table using ssisĬAST('' AS XML).value('xs:base64Binary(sql:column("FILE"))', 'VARBINARY(MAX)') that file has 4 columns and 1 column row which I matter is File column with base64 encoded valueģ. I have a CSV file which I downloaded using SSIS from an endpoint URLĢ.

#12345 abcd how to

I've seen a solutions with using functions LEN/MID/RIGHT and similar, but don't know how to apply them to my case.Hi Experts, i would like to get help on solving a issue.Kindly please help.ġ. Sort it alphabetically, but whenever you find a number, treat it like a number. If I simply sort it, then I have something like this: abc-1.11.3-2 Now, what I know for sure that there is a name (I don't know the length, it can be 1 character as well as it can be 15 characters and it can contain hyphens itself) then hyphen character and then version number.Īs you have probably noticed, "version numbers" have different structures, one looks like 12345-7 and in next line there can be 1.2.3-3 (basically, I know this is a number with optional dots beetwen digits ( 1.2.3 part) which ends with hyphen and a number (e.g.

12345 abcd

I have table with strings like this: abc-1.2.3-1















12345 abcd