Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: onytoo
  Where is onytoo?
 Padang
 Indonesia
 onytoo
 Tags
Subject: RE: I can't make this query
Thread ID: 288235 Message ID: 289353 # Views: 41 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Friday, December 31, 2010 5:11:53 AM         
   


> >
> > I did, Jun. Thanks for the idea. I have actually 4 person tables. Only employees & students can now rent books, but the app can expand, and in future people from parents.dbf and from users.dbf (users are not necessarily employees) might be able to rent books as well. So now I have 1 field, which I called "pers_id", and a second (integer) field which identifies what kind of ID is stored in pers_rec. 1=student, 2=employee, etc...
> > So I still have to join to 2 or more tables, but can still retrieve the borrower's name. About your second suggestion (combining students & employees in a SQL), it could be done, but not in my current forms, since I have 2 combos for stud & empl, where the user can pick a borrower (or a borrower that returns a book).
> >
> > Regards
> > Samir
>
> Hi Sammy
>
> How about this...
> Create another table called PersonKind that will filled with:
> ID NAME TABLE
> 1 STUDENT students
> 2 EMPLOYEE employees
> etc
>
> First combo in your form is used for above table
>
> *!* cboPersonKind interactivechange
> SEEK(this.Value, [PersonKind])
> lcTable = ALLTRIM(PersonKind.table)
> thisform.cboPerson.RowSourceType = 3
> thisform.cboPerson.RowSource = [SELECT name,id FROM ] + lcTable + [ ORDER BY name INTO CURSOR csrPerson]
> thisform.cboPerson.Requery()
> 

>
> And i think no need to combine all person table onto one SQL.
>
> Regards,
> Onytoo


Hello Ony, happy new year.
What will you do tonight? May be same as Jun, preparing your belly for a big quantity of beer?
Jun can drink at least 7 large beers, and still send understandable replies in foxite, I know that from an earlier thread. Can you as well? :-U

Thanks for your suggestion. I thought about doing as you said, but since I need that person separation only in this library module, and I have only 4 person tables, I keep the separation using #defines, for now (that may change someday)...

Regards
Samir

ENTIRE THREAD

I can't make this query Posted by Samir H. @ 12/18/2010 4:28:32 PM
RE: I can't make this query Posted by tushar @ 12/18/2010 5:03:30 PM
RE: I can't make this query Posted by Samir H. @ 12/18/2010 5:29:22 PM
RE: I can't make this query Posted by Borislav Borissov @ 12/18/2010 5:04:44 PM
RE: I can't make this query Posted by tushar @ 12/18/2010 5:21:26 PM
RE: I can't make this query Posted by Samir H. @ 12/18/2010 5:42:15 PM
RE: I can't make this query Posted by Anders Altberg @ 12/18/2010 7:24:13 PM
RE: I can't make this query Posted by Samir H. @ 12/18/2010 5:25:24 PM
RE: I can't make this query Posted by Anders Altberg @ 12/18/2010 7:43:53 PM
RE: I can't make this query Posted by Samir H. @ 12/28/2010 3:32:52 AM
RE: I can't make this query Posted by Anders Altberg @ 12/30/2010 1:48:06 PM
RE: I can't make this query Posted by Samir H. @ 12/30/2010 1:59:32 PM
RE: I can't make this query Posted by Jun Tangunan @ 12/31/2010 2:52:21 AM
RE: I can't make this query Posted by Samir H. @ 12/31/2010 3:26:06 AM
RE: I can't make this query Posted by Ony Too @ 12/31/2010 4:57:14 AM
RE: I can't make this query Posted by Samir H. @ 12/31/2010 5:11:53 AM
RE: I can't make this query Posted by Ony Too @ 12/31/2010 11:26:02 AM
RE: I can't make this query Posted by Jun Tangunan @ 1/3/2011 4:56:55 AM
RE: I can't make this query Posted by Samir H. @ 1/3/2011 5:11:03 AM
RE: I can't make this query Posted by Muhammad Majid Ali Attari @ 12/31/2010 6:24:50 AM
RE: I can't make this query Posted by Samir H. @ 12/31/2010 6:54:07 AM
RE: I can't make this query Posted by Muhammad Majid Ali Attari @ 1/1/2011 5:45:42 AM
RE: I can't make this query Posted by Mustapha Bihmouten @ 12/31/2010 11:06:04 AM
RE: I can't make this query Posted by Samir H. @ 12/31/2010 4:12:24 PM