Left Join problem
Lars Schärer
los at computer-nach-mass.de
Fri May 3 14:02:01 EDT 2013
try
Do iList_Main.$statementobject.$prepare()
Do iList_Main.$statementobject.$execute()
Do iList_Main.$statementobject.$fetch(MyList,MyNumber2Fetch,kTrue)
to get the data into MyList
LArs
-------- Original Message --------
Subject: Left Join problem (03-Mai-2013 19:53)
From: Bob Fiering <bob at maxolution.nl>
To: omnisdev-en at lists.omnis-dev.com
> Hi All,
>
> I have two tables, one with accounting numbers and one with cost types.
> In the accounting table is a field that points to the associating cost type.
>
>
> In Omnis (5.2.3) i made a query class with the fields from both tables
> which i want to see in a headed list.
> In my list i want to see Accounting info from table accountnumbers and the
> description from the associated cost type.
> The syntax is working perfect when used in the PGAdmin SQL Editor.
> When i look at the data in iList_Main the right cost type description is
> not fetched.
>
>
> Do iList_Main.$definefromsqlclass('Q_Costtype') {query class i made}
> Do iList_Main.$sessionobject.$assign(tvSessionObj) Returns #F
> Begin statement
> Sta: SELECT * FROM accountnumbers
> Sta: LEFT JOIN costtypes
> Sta: ON accountnumbers.costtype = costtypes.costtype
> End statement
> Do iList_Main.$prepare()
> Do iList_Main.$select()
> Do iList_Main.$fetch(kFetchAll)
>
> There must be one item in Omnis that i have missed to configure, but i
> haven't got a clue.
>
> Hope someone can tell me what i am doing wrong.
>
>
> Regards,
>
> Bob_____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list