View previous topic :: View next topic
|
Author |
Message |
rajeevdas03 Warnings : 1 New User
Joined: 21 Jan 2006 Posts: 19 Location: Mumbai
|
|
|
|
Hi,
I need help in sort,plz let me know is this feasible.
File1:
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+--
***************************** Top of Data *************************
A|BAT01|100|9878653421|C|this is for testing purpo |03/20/2012|
A|SAT01|200|1213454555|C|test data indi |03/22/2012| |
File2:
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
***************************** Top of Data *****************************
SENO MERCHANT LEVEL MERCHANT START DATE MERCHANT END DATE MERCHANT NAME
1234567893 S 3/18/2012 5/10/2011 abs coffe shop
8765341294 S 3/18/2012 5/10/2012 xyz restaurent |
I need my data(file2) should be in the file1 format;
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+--
***************************** Top of Data *************************
A|CAT01|100|1234567893|S|abs coffe shop |03/20/2011|
A|CAT01|100|8765341294|S|xyz restaurent |03/20/2012| |
can we do this using sort .
thanks in advance for your help. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you explain a little bit more (a lot more). I'm not going to stare at it for hours wondering if I'm getting close. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Your output does not match your input.
You need to post the "rules" not just data.
When posting data, use the Code tag. Your post has been coded. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Bill Woodger wrote: |
I'm not going to stare at it for hours wondering if I'm getting close. |
Where is the like button, ROFL! |
|
Back to top |
|
|
rajeevdas03 Warnings : 1 New User
Joined: 21 Jan 2006 Posts: 19 Location: Mumbai
|
|
|
|
Thanks for reply.
I think this will make you understand.
This is my sample file
File1;
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+--
***************************** Top of Data *************************
A|BAT01|100|9878653421|C|this is for testing purpo |03/20/2012| |
This is the file2
Code: |
1234567893 S 3/18/2012 abs coffe shop |
File2 does not contains fields; A|BAT01|100|
I need file2 data should be in file1 format;
example
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+--
***************************** Top of Data *************************
A|BAT01|100|[color=green]1234567893|S[/color]| abs coffe shop |03/20/2012| |
1234567893;this is present in file2 at first position and s at 2nd position.
Code'd, for a second time |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Now that is totally unclear. I thought, before I got to the last post, that you wnted MERCHANT NAME from the second dataset to replace the descriptive text in the first dataset (but on looking again I see that even that was wrong!).
So, how do you decide what data comes at the "front" of the record - just make it up? Please explain, in words, what the rules are for getting from input to output. If you need to display data use code tags to do so to keep alignment. |
|
Back to top |
|
|
|