NetTalk Central

Author Topic: View with hand coded join  (Read 3388 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
View with hand coded join
« on: April 27, 2009, 01:42:48 PM »
Hi,
I have a view with many related files that works well and I see my records in a web browse.
I add a table (actually the alias of a table)  to the View and write a join statement ( left outer join ) and now the Web Browse tells me that "there are no records". 
I tried binding the field in the primary field but still no joy.  Using C3.9054 .
My Primary table field is: JPSS:alt_prov_id
My alias table is : APROV
My Alias table is : APR:Provider_key  ( keyed on APR:Number and unique)

My "Custom join" is:  APR:Provider_Key, APR:Number=JPSS:alt_prov_id

Only a few records have a value for JPSS:alt_prov_id.  Anyway, with a left outer join, it should present all the records in the primary View filter irregardless of the JPSS:alt_prov_id value.

Something is not right - is it my Custom Join Statement or does Net Talk not play well with Custom Joins on Alias tables???
Thanks,
Ron Jolda

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: View with hand coded join
« Reply #1 on: April 27, 2009, 09:40:12 PM »
Hi Ron,

NetTalk doesn't really care about the construction of the View, so any legal View should be fine.

My suggestion for debugging would be this;
Using the View as you've got it now write a small loop to "read" the view and see how many records there are.

Do it just before the generated LOOP statement. See the way the Filter and Order properties are set (just after the call to p_web.SetView) and use those in your hand-coded loop.

My guess is that between your join, and the filter, there are indeed no records in the view. But you'll need to experiment a bit with both to figure out where you've gone wrong..

Cheers
Bruce

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: View with hand coded join
« Reply #2 on: April 27, 2009, 09:41:20 PM »
oh, and make sure your alias is added to the Tables list so that it's been opened - or Open the table manually.

Cheers
Bruce