"3rd" generation relationship

This is the place to post technical queries about SQL Yoga

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, trevordevore

Post Reply
Posts: 27
Joined: Mon May 09, 2016 10:53 am

"3rd" generation relationship

Post by nrprioleau » Fri Oct 07, 2016 11:41 am

This is a bit perplexing for me so hopefully I am just being short sighted here but I have 3 tables.

products (products)
poheader (purchase order header)
podetail (purchase order detail)

I have defined relationships between the poheader and podetail tables as well as a relationship between the products and the podetail table but there is no direct link between products and poheader table. When I populate data for the grid:

Code: Select all

put sqlquery_createObject("poheader") into theQueryA
   sqlquery_set theQueryA, "related table joins", "LEFT OUTER JOIN suppliers, LEFT OUTER JOIN podetail, LEFT OUTER JOIN products"
   ## Specify how results should be sorted
   sqlquery_set theQueryA, "order by", "poheader.poh_ID"
sqlquery_set theQueryA, "conditions", theConditions
It never returns any data for the products so my column for product name will be blank. I would appreciate a hint at where I am going wrong.

VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 986
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas

Re: "3rd" generation relationship

Post by trevordevore » Thu Mar 02, 2017 4:09 pm

@nrprioleau - I'm sorry I never responded to this. I am set up to receive notifications when posts are made to this forum but no notification was sent. Did you every resolve this issue?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply

Return to “SQL Yoga”