<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br><div><div>On May 22, 2013, at 6:30 PM, George Parkinson <<a href="mailto:george@microtherapy.ca">george@microtherapy.ca</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="background-color: rgb(255, 255, 255); font-family: 'lucida console', sans-serif; font-size: 10pt; position: static; z-index: auto; "><div><span>hi bart,</span></div><div style="font-size: 13.600000381469727px; font-family: 'lucida console', sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="font-size: 13.600000381469727px; font-family: 'lucida console', sans-serif; background-color: transparent; font-style: normal; "><span>i was afraid it was going to be something like that (procedure + loop)</span></div><div style="font-size: 13.600000381469727px; font-family: 'lucida console', sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div style="font-size: 13.600000381469727px; font-family: 'lucida console', sans-serif; background-color: transparent; font-style: normal; "><span>thanks for your help</span></div><div style="font-size: 13.600000381469727px; font-family: 'lucida console', sans-serif; background-color: transparent; font-style: normal; "><span>george</span></div><div style="font-size: 13.600000381469727px; font-family: 'lucida console', sans-serif; background-color: transparent; font-style: normal; "><span><br></span></div><div><br></div> </div></div></blockquote></div><div><br></div><div>There is one more way (a little bit tricky) - reading system tables directly.</div><div>Valentina keeps the schema in two system tables (hidden) - sysItem and sysItemDescription.</div><div><br></div><div>Here is some sketch - how it can be used:</div><div><br></div><div><br></div><div>SELECT </div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>a1."Value" tblName</div><div>FROM</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>sysitem a1</div><div>WHERE</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>a1.ItemDescrPtr = 55</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>AND a1.ParentPtr->RecID IN (SELECT a2.ParentPtr->ParentPtr FROM sysitem a2 WHERE a2.ItemDescrPtr = 65 AND a2."Value" = 'fieldName')</div><div><br></div><div>-- Short explanation:</div><div><br></div><div>- a1.ItemDescrPtr = 55 - 55 is a table-name item (see select * from sysItemDescription where recid = 55)</div><div>- a2.ItemDescrPtr = 65 - 65 is a field-name item (see select * from sysItemDescription where recid = 65)</div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; ">- </span>a1.ParentPtr->RecID - Valentina extension - means "get RecID which is linked to the current record using ParentPtr link".</div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><br></span></div><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">-- <br>Best regards,<br>Ivan Smahin<br>Senior Software Engineer<br>Paradigma Software, Inc<br>Valentina - The Ultra-Fast Database<br><a href="http://www.valentina-db.com/">http://www.valentina-db.com</a></span>
</div>
<br></div><br><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>-- <br>Best regards,<br>Ivan Smahin<br>Senior Software Engineer<br>Paradigma Software, Inc<br>Valentina - The Ultra-Fast Database<br><a href="http://www.valentina-db.com/">http://www.valentina-db.com</a></div></span>
</div>
<br></body></html>