Forum Discussion

TechR21's avatar
TechR21
Icon for Helper V rankHelper V
3 years ago

calculating a value based on other column

I have the following data

 

 

a ticketnumber has an id in the ticketdetails table. This id is linked with the table tickets. A ticket has a majorticketid, or is blank (when there is no major ticket assigned).

 

When there is a majorticket assigned, this also has a ticketnumber in the table ticketdetails.

 

Now i need to be able to create a column ticketdetails table, that basically says;

when ticket.majorticketid is not empty then ticketdetailsticketnumber, otherwise blank

 

both tables are linked via ticketid, one on one relationship.

 

 

3 Replies