02-23-2009
split the fields in a column into 3 columns
Have a column "address" which is combination of city, region and postal code like.
Format is : city<comma><space>region<space>postal code
abc, xyz 123456
All these three city, region and postal code are not mandatory. There can be any one of the above. In that case a nell needs to be inserted.
Need to split these fields into 3 columns city, region and postal code and insert into another table.
script can be in mysql or sqlserver
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hey guys...
Im looking to do the following:
1
2
3
4
5
6
7
8
9
Change to:
1 4 7
2 5 8
3 6 9
Did use | perl -lpe'$\=$.%3?$":"\n"' , but it doesnt give me the matrix i want. (3 Replies)
Discussion started by: zaneded
3 Replies
2. Shell Programming and Scripting
hey,
i have the following data:
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000 (7 Replies)
Discussion started by: zaneded
7 Replies
3. Shell Programming and Scripting
Hello;
I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies
4. Shell Programming and Scripting
Hi Friends,
I have come across some files where some of the columns don not have data.
Key, Data1,Data2,Data3,Data4,Data5
A,5,6,,10,,
A,3,4,,3,,
B,1,,4,5,,
B,2,,3,4,,
If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies
5. UNIX for Dummies Questions & Answers
Hey everyone,
I have an issue with a client that is passing me a list of values in one column, and occasionally the combination of all the values results in more than an 255 character string. My DB has a 255 character limit, so I am looking to take the column (comma delimited file), and if it... (1 Reply)
Discussion started by: perekl
1 Replies
6. Shell Programming and Scripting
Hi,
I need help to split a long text in a column which is separated by ; and i need to print them out in multiple columns. My input file is tab-delimited and has 11 columns as below:-
aRg02004 21452 asdfwf 21452 21452 4.6e-29 5e-29 -1 3 50 ffg|GGD|9009 14101.10 High class -node. ; ffg|GGD|969... (3 Replies)
Discussion started by: redse171
3 Replies
7. Shell Programming and Scripting
input:
chr1 1 2 3
chr1 1 2 4
chr1 2 4 5
chr2 3 6 9
chr2 3 6 10
Code:
awk '{a+=$4}END{for (i in a) print i,a}' input
Output:
chr112 7
chr236 19
chr124 5
Desired output:
chr1 1 2 7
chr2 3 6 19
chr1 2 4 5 (1 Reply)
Discussion started by: jacobs.smith
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a text file 'Item_List.txt' containing only 1 column. This column lists different products, each separated by the same generic string header "NEW PRODUCT, VERSION 1.1". After this the name of the product is given, then a delimiter string "PRODUCT FIELD", and then the name of the... (11 Replies)
Discussion started by: mmab
11 Replies
9. Shell Programming and Scripting
I want to split this with every 5 or 50 depend on how much data the file will have. And remove the comma on the end
Source file will have
001,0002,0003,004,005,0006,0007,007A,007B,007C,007E,007F,008A,008C
Need Output from every 5 tab and remove the comma from end of each row
... (4 Replies)
Discussion started by: ranjancom2000
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am trying to split the following output into two columns, where each column has Source: Destination:
OUTPUT TO FILTER
$ tshark -r Capture_without_mtr.pcap -V | awk '/ (Source|Destination): /' | more
Source: x.x.x.x
Destination: x.x.x.x
Source:... (2 Replies)
Discussion started by: sand1234
2 Replies
LEARN ABOUT PHP
yaz_itemorder
YAZ_ITEMORDER(3) 1 YAZ_ITEMORDER(3)
yaz_itemorder - Prepares for Z39.50 Item Order with an ILL-Request package
SYNOPSIS
void yaz_itemorder (resource $id, array $args)
DESCRIPTION
This function prepares for an Extended Services request using the Profile for the Use of Z39.50 Item Order Extended Service to Transport
ILL (Profile/1). See this and the specification.
PARAMETERS
o $id
- The connection resource returned by yaz_connect(3).
o $args
- Must be an associative array with information about the Item Order request to be sent. The key of the hash is the name of the
corresponding ASN.1 tag path. For example, the ISBN below the Item-ID has the key item-id,ISBN. The ILL-Request parameters are:
transaction-id,initial-requester-id,person-or-institution-symbol,person transaction-id,initial-requester-id,person-or-institution-
symbol,institution transaction-id,initial-requester-id,name-of-person-or-institution,name-of-person transaction-id,initial-
requester-id,name-of-person-or-institution,name-of-institution transaction-id,transaction-group-qualifier transaction-id,transac-
tion-qualifier transaction-id,sub-transaction-qualifier service-date-time,this,date service-date-time,this,time service-date-
time,original,date service-date-time,original,time requester-id,person-or-institution-symbol,person requester-id,person-or-institu-
tion-symbol,institution requester-id,name-of-person-or-institution,name-of-person requester-id,name-of-person-or-institution,name-
of-institution responder-id,person-or-institution-symbol,person responder-id,person-or-institution-symbol,institution responder-
id,name-of-person-or-institution,name-of-person responder-id,name-of-person-or-institution,name-of-institution transaction-type
delivery-address,postal-address,name-of-person-or-institution,name-of-person delivery-address,postal-address,name-of-person-or-
institution,name-of-institution delivery-address,postal-address,extended-postal-delivery-address delivery-address,postal-
address,street-and-number delivery-address,postal-address,post-office-box delivery-address,postal-address,city delivery-
address,postal-address,region delivery-address,postal-address,country delivery-address,postal-address,postal-code delivery-
address,electronic-address,telecom-service-identifier delivery-address,electronic-address,telecom-service-addreess billing-
address,postal-address,name-of-person-or-institution,name-of-person billing-address,postal-address,name-of-person-or-institu-
tion,name-of-institution billing-address,postal-address,extended-postal-delivery-address billing-address,postal-address,street-and-
number billing-address,postal-address,post-office-box billing-address,postal-address,city billing-address,postal-address,region
billing-address,postal-address,country billing-address,postal-address,postal-code billing-address,electronic-address,telecom-ser-
vice-identifier billing-address,electronic-address,telecom-service-addreess ill-service-type requester-optional-messages,can-send-
RECEIVED requester-optional-messages,can-send-RETURNED requester-optional-messages,requester-SHIPPED requester-optional-mes-
sages,requester-CHECKED-IN search-type,level-of-service search-type,need-before-date search-type,expiry-date search-type,expiry-flag
place-on-hold client-id,client-name client-id,client-status client-id,client-identifier item-id,item-type item-id,call-number item-
id,author item-id,title item-id,sub-title item-id,sponsoring-body item-id,place-of-publication item-id,publisher item-id,series-
title-number item-id,volume-issue item-id,edition item-id,publication-date item-id,publication-date-of-component item-id,author-of-
article item-id,title-of-article item-id,pagination item-id,ISBN item-id,ISSN item-id,additional-no-letters item-id,verification-
reference-source copyright-complicance retry-flag forward-flag requester-note forward-note
user-id contact-name contact-phone contact-email itemorder-item
RETURN VALUES
No value is returned.
PHP Documentation Group YAZ_ITEMORDER(3)