multiple table search
Ivan Smahin
IvanSmahin at public.kherson.ua
Wed Mar 30 22:30:03 CST 2005
Hello Gregory,
Wednesday, March 30, 2005, 9:53:07 PM, you wrote:
GK> I tried the code you suggested and got no crash, but when I do
GK> getrecordcount(gmycursor)
GK> I only get 1 result when in fact I should get two (one record in
GK> fieldtwo (ATable) and one record in fieldfour (BTable)).
Strange. I guess you used "union" case?
What about checked-field types in that tables.
Let's consider your project or particular query offlist.
It seems to be something wrong there. I checked example you described here - and
got the expected result.
GK> I have a situation where I have a DB with many tables for different
GK> categories of products.
GK> What I want to do is be able to query all the tables in the DB for a
GK> product number.
GK> So, say I want to look for product number 1004, then I want to query
GK> all tables for that number. Is the syntax you propose god for that?
In this case UNION seems to be a best solution. But if you have any ability you
should consider some normalizing for the database to have such product numbers -
all together - in the separate "refference" table. Other tables will point to records
in this one using the links. Valentina has 3 link types - not only key-based (RDB) one.
In this case you get the ability to use table-joins and your query becomes much more clear -
just "give me all linked to this product number records".
You can find more details in the docs.
--
Best regards,
Ivan mailto:IvanSmahin at public.kherson.ua
More information about the Valentina
mailing list