I have a data with 4 columns separete with tab delimiter as following:
A B {123} E{456}
C D {789} T{159}
My expected result as following: (become 5 columns)
A B {123} E {456}
C D {789} T {159}
Is there any way to separate the 4th column to 2 field by using the tab delimiter?
Basics:I'm running SQL Server 2008 R2 Standard.
I need to create a query that has data from multiple columns (Columns 1-6 with coresponding Date started and Date Completed data) displayed vertically, but also has the column name the preeceeding column to identify it...along with other data (Record number, status).
Record Number, Status, Column Name, Date Started, DateCompleted
1, Open, Column 1,
I have a two files, file A and B, which have 5 columns, and each 5 columns are made up of random numbers, that means, numbers are all different.
I want to convert all apostrophes in this file to X:
Bob's book
Bob’s book
Bob′s book # (Might look the same but actually different)
The first apostrophe is replaced as expected:
$ cat file | tr "'" "X"
BobXs book
Bob’s book
Bob′s book
But the the two other kinds of apostrophe, strange things happen:
$ cat file | tr "’" "X"
Bob's book
BobXXXs book
BobXX�s book
$ cat file | tr "′" "X"
Bob'
Hi..
I have data file..
Hi,
I have a space delimited text file that looks like the following:
Code:
Aa 100 200
Bb 300 100
Cc X 500
Dd 600 X
Basically, I want to take the average of columns 2 and 3 and print it in column 4. However if there is an X in either column 2 or 3, I want to print the non-X value.
Hello,
I have a bunch of strings of the following format:
Code:
11.22.33.44.in-addr.arpa x.y.z.
What I want to do is format each string in this way:
Code:
44.33.22.11 x.y.z
i.e. the string conists of two columns, where delimiter is space. I need to output modified first column (delimiter inside that column is .
I have a flat file with the 3 columns and separate by tab delimiter, and the last column with special character.
A B [abc3]
C D [def4]
F G [ghi5]
Now I would like to swap the third column with second column to following format:
A [abc3] B
C [def4] D
F [mip5] G
I know this cannot be done in Unix command with using cut command.
Please advise.
Source 1
Code:
column1 column2 column 3 column4
1,ganesh,1,000,1
222,ram,2,000,5
222,ram,50,000,5
33,raju,5,000,7
33,raju,5,000,7
33,raju,5,000,8
33,raju,5,000,4
33,raju,5,000,1
In my .csv file, third column is having price value with comma (20,300), it has to be considered 1,000 as single column.my output should have only 4 columns not 5 columns .