Director-SQL:Select all fields from linked record?

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jun 9 10:28:55 CDT 2006


On 6/9/06 4:48 AM, "Michael Bedar" <mike at bedar.net> wrote:

Hi Michael,

> I have a select statement like
> 
> "SELECT AB_LINK->AField1 FROM TableB"
> 
> where TableA and TableB are linked with AB_LINK,

What kind of link?  ObjectPtr? BinaryLink?

> and AField1 is of course a field in TableA
> 
> This works, but I need to get 2 fields, so I tried
> 
> "SELECT AB_LINK->AField1,AB_LINK->AField2  FROM TableB"
> 
> Which seems to work, BUT then later when I use getRecordsAsPropList()
> on the cursor that the above select statement returns, the field
> names are not coming through.. i get "#No_name1:" and so on..

Looks to be bug...Logically of course that

        link->FieldName
     
Get name of that field.

As workaround you can try advice of Sean:

  SELECT AB_LINK->AField1 as 'F1', AB_LINK->AField2 as 'F2'
  FROM TableB


> So I was trying to figure out how to get all the fields.. I didn't
> think ** would work after the -> (and I was right) but is there
> another way to do this?
> 
> And does anyone know why my field names where not coming through in
> the prop list?

Also you can do this in traditional way using joins:

Select a.AField1, a.AField2
>From TableA a join TableB ON AB_Link


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list