View previous topic :: View next topic
|
Author |
Message |
chandru1980
New User
Joined: 01 Feb 2006 Posts: 4 Location: Bangalore, chennai
|
|
|
|
Requirment: we have 2 tables need to select the data from both tables using same key which is entered by user and display the retrieved columns on top from one table with five rows and from second table at the bottom five rows. if dont entered and selected the indicator Y fetch all the records and display. PF7 and PF8 for scroll.
one table has the key 8 bytes and other one splitted as 5 and 3.
showing the exampple for splitted one and second table records.
Table 1 Table 2
00012 001 00012001
00012 002 <---- no record leave as blank in the screen
00012 003 00012003
To select one record using one select statement for each table.
To select more records one select with cursor statement for each table.
to select all records one select with cursor statement for each table.
My question is fetching records with seperate select cursor for each table.
Is it possible to match the fetched records while scrolling them.
I need a piece of code for matching the records while scrolling if no match I have to keep it blank like as mentioned above example table data.
Any suggestion pls.
Thanks,
Hari |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
I need a piece of code for matching the records while scrolling if no match I have to keep it blank like as mentioned above example table data. |
Unfortunately the chances of getting it are pretty slim
but ... where do You face problems the logic or the code ??? |
|
Back to top |
|
|
chandru1980
New User
Joined: 01 Feb 2006 Posts: 4 Location: Bangalore, chennai
|
|
|
|
I have a sample program but its scroll logic bit not understandable. Also it hard to explain the existing one. If you have any scroll logic I can use it. Please let me know If you have any idea.
Thanks,
Hari |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
I suspect there is code already running on your system that could be cloned and modified for your requirement. If the code is used for production on your system, someone there understanda how it works . . . |
|
Back to top |
|
|
chandru1980
New User
Joined: 01 Feb 2006 Posts: 4 Location: Bangalore, chennai
|
|
|
|
Thanks for the replies.
I am using the existing logic and introducing only the matching logic for 2 tables before displaying the screen. hope it will work. thanks for your support.
Cheers,
Hari |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Two things:
1) Your post says "top" and "bottom" like you are putting
table1 row1
table1 row2
table1 row3
table1 row4
table1 row5
table2 row1
table2 row2
table2 row3
table2 row4
table2 row5
on the screen, but your example shows a join between them.
2) What you show in your example sure looks a lot like a LEFT OUTER JOIN. You may be able to code that and have it put the blanks in there for you. |
|
Back to top |
|
|
|