How to append data from one file to another
Hello,
I am trying to replace one column of numbers in a 2D array with a unique string from another file.
Pos. Serial Gain
2 3252 4
4 15697 4
6 15543 4
I want to replace the "4" in the third column with a string obtained from another file, such as;
Serial # 3252 Fuel Cell # arxe-2282
Time and date 09:47 09/08/07
Version 4.0
Serial # 1234 Fuel Cell # arxf-0047
Time and date 09:50 09/08/07
Version 4.0
In this case, I want to replace the "4" in the first row of the top file (after the header) with "arxe-2282" from the file just above.
This means I need to search though the second file (which will have multiple entries) and find the same serial number (in this case "3252") and then write the "arxe-2282" string in place of the "4" in the top file, right next to the "3252" number there.
The search part is proving difficult. I can replace the "4" easy enough, but only if I already know where the "arxe-2282" is in the second file.
Any ideas?
Tay
try this.....
the program uses the match pattern and scan from string functions. And there is still room for improvement.
If you have to do is more often with bigger files, you should create a lookup table first. currently the files is scanned each time ....
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
Attachments:
find location.vi 11 KB
Similar Messages
-
Appending data from one table to another
Hello
How to append data from one table t1 to another table t2.
t1 and t2 have the same structures .
t2 contains already data so i don't want do delete it and create it as select * from t1.
If there is a mean to add t1 content without altering t2 content.
Thanks in advanceinsert into t2
select * from t1 -
How to transfer data from one system to another by datamart please give de
how to transfer data from one system to another by datamart please give details
Hi Deba,
Find the below SAP help doc which may help u...
http://help.sap.com/saphelp_nw70/helpdata/en/12/43074208ae2a38e10000000a1550b0/frameset.htm
Also find the below threads...
Loading data from one cube to another cube.
data copy from infocube to infocube in two different BW systems
Delta when loading from ODS to ODS
reg datamart
Data mart flag
Regards,
KK. -
How to transfer data from one macbookpro to another
how to you transfer data from one macbookpro to another. the other one was stolen.
If your computer was stolen and you don't have a data backup, you can't transfer data from the stolen computer to your new one. If you have a data backup, restore the data to the new computer.
-
Append data from one table to another.
Hi,
I want to insert/append some or all the data from one table to another table.
For eg: Data from table table1 to be appended to table2 with the same constraints, indexes etc. The columns are same for both the tables.
I am using 10g version 2.
Please specify which method would be good for this process.
Thanks
JafarINSERT INTO TABLE1 SELECT * FROM TABLE2;The above command would insert data into table2 and it also contain the old data.Is that right,
Thanks
Jafar -
How to transfer DATA from one machine to another using DBlink
I want to transfer data from one machine to another both having oracle 8.0.5 with AIX operating system using DB link. CAn any one help me in this task
Step one - Create and test SQLNet connections between the databases.
Step two - Create at least on database like from one database to the other:
CREATE DATABASE LINK linkname
CONNECT TO user identified by password
USING 'tnsnamesentry';
Step three - use the dblink linkname in dml statements eg:
insert into emp@linkname
(select * from emp); -
How to copy data from one table to another (in other database)
Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
ResultSet rset = stmt.executeQuery("select ...");
But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.
-
How to transfer data from one client to another client
Dear Experts,
Please explain how to transfer data (Materials) from one client to another client?
Thanks,
Ajay KumarHi Ajay,
Check any of below methods
Refer thread http://scn.sap.com/thread/171981 where people use IDOCs for master data transfer.
OR
This is done by BASIS team, by client refresh or client copy. Check with your basis team for this and there is some predefined time when they plan this activity, and in most project they do it once in 3 months etc to get production environment in test system which helps to resolve issues of production by creating similar case in test system.
Check below threads for more information
http://sap.ittoolbox.com/groups/technical-functional/sap-basis/cleint-copy-vs-client-refresh-1377848
http://basissap.blogspot.in/2008/05/what-is-client-copy.html
OR
You can download data from one client and upload in another through BDC or LSMW.
Regards,
Sharat -
How to transport data from one tab to another(mapinfo)?
Hello all,
due to a change of design i have to transport datas from one
spatial table to another in order to use them in mapinfo.
How can i handle this with polygon datas?
if i just do a simple "insert into tab select * from anothertab;
all std datas are moved but the spatials generate errors while
opening in mapinfo (illegal data type) any ideas or suggestions?
Thanks i advance,
Volker I. LipperHi,
just a guess - maybe the necessary metadata is missing. I suggest
you check the MAPINFO.MAPINFO_MAPCATALOG table for the
appropriate entry (for "anothertab"). If there is no
corresponding row, you need to make the table mappable in Mapinfo
Pro first.
Hope this helps,
--- Hans. -
How to transfer data from one phone to another
my daughter got a new phone. she is trying to transfer data from her old phone. she cant remember her icloud password. we can't have them email because the email uses the same password. If i delete the account all the information we are trying to transfer will be lost. Any idea how to retrieve the password?
You transfer data to a new phone by backing up the old one, then restoring the backup to the new one (see http://support.apple.com/kb/ht2109).
Also, deleting the account only deletes it from the phone, not from iCloud. But if you're running iOS 7 with Find My iPhone turned on you'll need the password in order to delte the account.
If you need to reset the password, contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password. -
What is the best way to append data from one field to another?
I have the following table, table1:
Name Null? Type
MAIL_ID NOT NULL NUMBER(10)
LAST_NAME VARCHAR2(45)
FIRST_NAME VARCHAR2(45)
MIDDLE_INITIAL VARCHAR2(1)
ADDRESS_1 VARCHAR2(45)
CITY VARCHAR2(35)
STATE VARCHAR2(2)
ZIP VARCHAR2(10)
REMARKS VARCHAR2(200)
The table has duplicate entries that need to be removed. The records that will be removed need the
data in the Remarks column appended to the Remarks data of the record that is not deleted.
For example, the following listing shows a sample of the duplicate records.
Mail ID Last Name First Name M Address City St ZIP Remarks
189 BROWN STEPHEN 6706 MOESER LN EL CERRITO CA 94530-2909 Sf7#s124,f16#d7996(NML)[Cl#117][Ml#1649][NMf1#d288][NCf9#d319][SNl#e62]
211023 BROWN STEPHEN B 6706 MOESER LN EL CERRITO CA 94530 RLl#a12047[IDl#i398]
287796 BROWN STEPHEN B 6706 MOESER LN EL CERRITO CA 94530 SNl#e1163
The following listing shows how the kept record should appear after the duplicate records are deleted.
Mail ID Last Name First Name M Address City St ZIP Remarks
189 BROWN STEPHEN 6706 MOESER LN EL CERRITO CA 94530-2909 Sf7#s124,f16#d7996(NML)[Cl#117][Ml#1649][NMf1#d288][NCf9#d319][SNl#e62]RLl#a12047[IDl#i398]SNl#e1163
I have the process of deleting duplicates working but have yet to determine the best way to move
the Remarks data from the deleted records to the preserved record.
I know there are probably various ways to approach this.
Any suggestions will be greatly appreciated!
Here is the sql for deleting duplicates.
DELETE FROM table1
WHERE mail_id in (SELECT mail_id FROM table1
where not first_name = 'Null' and
not last_name = 'Null' and
not city = 'Null' and
not state = 'Null'and
not last_name = 'Anon'
minus
select min(mail_id) from table1
group by first_name, last_name, city, state, address_1, organization, title);
THANKS in advance!!!!Here's quick and dirty example probably a better way to do it, but this is what I came up with quickly.
My table looks like this:
MAIL_ID LAST FIRST PHONE REMARKS
123 Ruff Shawn 555-555-5555 Called 10-10-04
135 Ruff Shawn 555-555-5555 Called 10-12-04
201 Ruff Shawn 555-555-5555 Called 10-19-04
The code below will concatenate the remarks column from the rows, and delete the 135 and 201 rows, then update the 123 row with the concatenated remarks.
declare
l_remarks varchar2(500);
l_min_mail_id number;
begin
select min(mail_id) into l_min_mail_id
from test
group by last, first, phone;
select remarks into l_remarks from test where mail_id = l_min_mail_id;
for i in (select mail_id, remarks from test
where last = 'Ruff'
and first = 'Shawn'
and phone = '555-555-5555'
and mail_id <> l_min_mail_id)
loop
l_remarks := l_remarks||','||i.remarks;
delete from test where mail_id = i.mail_id;
end loop;
update test set remarks = l_remarks where mail_id = l_min_mail_id;
commit;
end;
Hope this helps. -
How to load data from one Infocube to another request by request using DTP
Hi All,
I have a scenario where we are maintaining backup Infocube B for Infocube A. User loads data from a flat file many times a day in different requests. We need to maintain backup of the Infocube A on weekly basis. i.e data to be refreshed with delta update from cube A to cube B. There are some situations where user deletes some of the requests in Infocube A randomly after use. Will this change effect in back up cube B when performed data refresh from cube A to cube B. i.e. this functionality is similar to reconstruct in BW 3.5. Now we are running on BI 7.0 SP 9.
Can anyone answer this ASAP.
Many Thanks,
RaviYou cannot load request by request, " Get Data By Request " DTP loads request by request on " First In First Out " basis. You can run some Pseudo/Fake DTP's if you dont want to load data from a particular request.
If the user deletes a request from Cube A, it wont be loaded to Cube B but if it is already loaded in Cube B and later the user deletes the request from Cube A you have to delete the request frm Cube B. Inorder to monitor request by request run DTP with " Get Data By Request set. -
How to move data from one database to another one?
I 'd like to build up a new database, some of the data would come from an old database, then I have to make two connection objects to both databases, (two statement objects...) retrieving the data from the old one and inserting them to the new one.... sounds reasonable, huh? but it could not work this way... "........it would have caused the duplicated value , blah, blah..." even though I made two tables in two databases completely different, that errors are still there. seemed I cannot clone that table.
could you guys have any better ideas? and why couldn't I go this way?
the database: cloudscape3.01
two databases are all on my local PC (WinNT4.0)
thanksIf you are getting dupicate record errors, then look at your recordset objects and make sure they are both pointing at seperate databases, and check the one you are using to output and make sure it isn't just writing NULL, if it is then trace up the line: your input (read) recordset may be reading NULL too.
-
How to move data from one account to another?
Sheesh, I think I've created a monster for myself. I got a new macbook pro and migrated my data from Time Machine. As I was doing everything I didn't realize that the set up for the computer was in a different account than the migrated data went to. So I have my main account on the computer and another account with all my emails, itunes pics etc.
I think the other account is considered the main account on the computer so just to make sure I have all my privileges etc, I want to transfer all this data into the main account. Does that make sense?
I started figuring all of this out as a problem when my second account (the one with all my old data) could not download podcasts. I can do that with the main account.
Anyway, can anybody tell me a simple way to transfer all of this? Should I just try to start all over?
Thanks!The Users -> shared folder is a common ground all accounts share.
-
How to transfer data from one MBP to another on the same wireless network?
Hello All,
My wife & I both have MBP's & are connect to the internet wirelessly via a Comcast-supplied Arris modem & a Belken router I purchased.
Please don't laugh too hard but when I share data with my wife I, first, transfer it onto a flash drvie, then I walk to my wife's mbp & transfer the data from the flash drive to her mbp.
I have a feeling there is a better way. Since I guess we are on the same network can I do this wirelessly some how?
Any help would be appreciated!
Thanks in advance.
Jimhere is a link to some information on AirDrop --
http://support.apple.com/kb/HT4783?viewlocale=en_US&locale=en_US
Maybe you are looking for
-
Subtotal Text in ALV Grid and hiding empty row
Hello, ive got a ALV-Grid with a few fields .. Total on one field subtotal on VKORG, category or some other fields . after subtotal of one of the 2 named fields i'm reading the literal to the given fields and writing them in the table which is displa
-
How can I hide constant variable value in class file?
hi,everybody. I am having a problem with constant variable which define connectted with database(URL,username,password). when I used UltraEdit to open class file, I can see constant variable value. Thanks!
-
Hi, there, I downloaded the JDeveloper 2.0.184 Beta from the web. However, I had problem getting my application work when try to connect to the database. I chose Sun's JDBC-ODBC bridge to connect to Oracle7 via ODBC DSN on my NT box. When I am in the
-
hi all. sorry i got one small doubt is here in my scenario i have to send data from 2 diferent file snders to one bapi. i developed the interface in xi and its working so i need to check the table in bapi and iam having acess too to check that bapi
-
How. Much does the iPhone 5 s cost