0

Good day,

I am having trouble with my dbase.

i have 2 tables first is the maintenance table while the other is transactional table.

on my maintenance table i have field(id, plan, material,type,percentage)
while on the transaction table (id,material,description)

here is my problem.

on the maintenance table let say

  id  plan   material   type          percentage
  1   1010   sample     in transit    100
  2   1011   example    haulage        50
  3   1012   mysample   production    100

based on the data above i want to select type and join it on the transactional table.
let say...

  id     material           description        INTRANSIT           HAULAGE           PRODUCTION
  1      sample             sample description 100                  0                  0
  2      example            example desc        0                  50                  0
  3      mysample           my sample desc      0                  0                  100

here is my problem.

on the maintenance table let say

id  plan   material   type          percentage
1   1010   sample     in transit    100
2   1011   example    haulage        50
3   1012   mysample   production    100

id     material           description        INTRANSIT           HAULAGE           PRODUCTION
1      sample             sample description 100                  0                  0
2      example            example desc        0                  50                  0
3      mysample           my sample desc      0                  0                  100

based on the data above i want to select type and join it on the transactional table.

id     material           description        INTRANSIT           HAULAGE           PRODUCTION
1      sample             sample description 100                  0                  0
2      example            example desc        0                  50                  0
3      mysample           my sample desc      0                  0                  100

can someone guide me with this.. thanks

Edited by pritaeas: Fixed markdown

2
Contributors
2
Replies
14
Views
4 Years
Discussion Span
Last Post by cyberdaemon
0

HI, There is no any connectivity between two tables. you should have one..
Change your Transaction Table such as
ID,MID(FK,PK),Type,Rest of the field.

now using MID you can get the type from maintenance table and can insert into transaction table.

2Ways)
If you are using Web Application you can store into a session of maintenance type based on ID.
or
If you are using Windows you can store into a string. Create one class and call when it's require
Hope I ma clear and it will help you.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.