Hi,

I need help with the following;

Table 1
---------
Col A
1
2
3
4
5

Table 2
---------
Col A ColB
1 AA
2 BB
3 CC
4 DD
5 EE

I need to look up say Table 1 Row 3, reference that to 'Table 2' but instead of pulling back 'CC'. I need to pull back the data from a couple of rows down and get 'EE' returned.

Many thanks

Rottie

What you are asking doesn't make sense, this is a relational database. If there is no relation in Table 1 with the Data you want in Table 2 then why would you try to access it using Table 1. What happens when someone deletes row 4 in Table2.

Hi cgyrob,

I agree with you, which is why I am having issue with it. Basically this is a external database and I cannot alter it in any way but the reference from one table relative to another is correct but the data 'EE' is shifted by two rows and I keep getting back 'CC'. Not sure if this can be adressed but if you don't ask...

Cheers

Rottie

Depending on how big the table is you could create a mapping table on your end to map to the correct rows in the external database.

Hi,

I think that is the only way around this issue, many thanks

Rottie

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.