PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

eVB database problem

Hi,

This is my first message to this forum, so hi everyone :-).

I use eVB and have a pocketpc2002 device (iPAQ).
I have a problem with runninh such query:
select tableA.name inner join tableB on (tableA.name = tableB.name)

It seems like every query that ries to retrieve data from more than one table doesn't work.
Is this some sort of a limit for PocketAccess or am I doing something wrong ?

Can somebody give me an example of a working query ?

regards
Kuba
Kuba · 24 Oct 2003, 12:01 UTC — almost there :-)
well, the brackets caused an error
without brackets it works

but I have another problem now

how to join tables by 2 fields
... inner join tableA.field1 = tableB.field1 and tableA.field2 = tableB.field2

this doesn't work
it doesn't work with brackets either

anyone did this before and knows what's wrong ?


Kuba
No idea about pocket access, but a general SQL query would be something like:

select tableA.name
from tableA, tableB
where tableA.name=tableB.name


Looks like you're missing the equivalent of "from tableA, tableB", perhaps (tableA in particular).

Going on the syntax you used and adding the "from TableA", I'd try:
select tableA.name
from TableA inner join tableB
on tableA.name = tableB.name


unless MS have some weird syntax, just adding the exta clause onto the end sould be OK.
Kuba · 27 Oct 2003, 08:22 UTC — :-)
you're right of course but this was just my mistake when typing the message to this forum
unfortunately

this is what I have now:

select tableA.fieldA from tableA inner join tableB on tableA.M = tableB.M and tableA.B = tableB.B

and I still get an error
Give this a go:

Code:
select tableA.fieldA
from tableA
inner join tableB on tableA.M = tableB.M
inner join tableB on tableA.B = tableB.B


You might need an index on the fields you're joining.
Code:
select tableA.fieldA
from tableA
inner join tableB on tableA.M = tableB.M
inner join tableB on tableA.B = tableB.B


seems like it doesn't work either

this is what I have now:
Code:
select tableA.fieldA
from tableA
inner join tableB on tableA.M = tableB.M
where tableA.B = x and tableB.B = x


at least it works :-)

> You might need an index on the fields you're joining.
I also read that manual :-)
these fields are indexed in the Access tables which are export to the PocketPC, so I guess they are indexed in PocketAccess as well

anyway, thanks for your help
it works for now (although it doesn't look professionally), Now I get to inserting data :-)


Kuba