Table1 has id, firstname, lastname
Table2 has A|id, address,city. A|id is the primary key. how do i set relationship. since id column has a prefix of "A|"
Posted 15 November 2015 - 11:56 AM
Table1 has id, firstname, lastname
Table2 has A|id, address,city. A|id is the primary key. how do i set relationship. since id column has a prefix of "A|"
Posted 15 November 2015 - 01:38 PM
Great Thanks Paul. But except A|id no other column is primary key & how would i relate it with other table. only difference in table is it has a prefix
table1: primary_key , vs a table2 prefix_primary_key no other column has primary key which can be related.
example
employee
id name
1 steve
2 rob
3 bell
position
position_id e_id position
a e_1 manager
b e_2 seller
c e_3 director
result
name position
steve manager
rob seller
bell director
Posted 16 November 2015 - 01:12 AM
I dont understand actualy what u need in this question
u mean that value in table 'position' column e_id have format like e_1, e_2, e_3 or what?
if so then u should change it cause this is horribly wrong!
why u dont do like this one ???
employee table
id name
1 steve
2 rob
3 bell
position table
id employer_id position
1 1 manager
2 2 seller
3 3 director
Posted 16 November 2015 - 08:05 AM
Thanks for your reply. I know that it in the regular table format as you suggested it works
if we remove the prefix then it will not be the primary key. see the below table i have added more sample data. can we use concatenate option during table relation ?
position
position_id e_id position
a e_1 manager
b e_2 seller
c e_3 director
e x_1 zonemanager
f x_2 zoneseller
Posted 16 November 2015 - 11:52 AM
I told u, change u database schema. U have ID in one table 1, 2, 3 and in another e_1, x_2, ???_3, ???_4. So how u want to join that fields?
Support →
I have a question →
set relations between tables in different databases, same "domain", same databases passwordsStarted by fede72bari, 15 May 2020 ![]() |
|
![]() |
||
Support →
Bugs / Issues →
fields with set_relation inserts empty when save button (not save and go back to list)Started by troyv, 08 Oct 2019 ![]() |
|
![]() |
||
Support →
Bugs / Issues →
set_relation including where statementStarted by noplan, 18 Mar 2019 ![]() |
|
![]() |
||
Support →
I have a question →
set_relation with where parameterStarted by noplan, 17 Mar 2019 ![]() |
|
![]() |
||
Support →
General →
removing the priority from relation file in an n to nStarted by richb201, 17 Apr 2018 ![]() |
|
![]() |
0 members, 0 guests, 0 anonymous users