I've a problem with finding the correct algorithm for quoting.
When I've a view in the database, where 2 tables have the same field
names "PatNr",
doing a pragma to get the fields of the view, I get:
PatNr
PatNr:1
For quering the data from that view, I don't ask for the view, but
generate my own normal select
(that is because I want to reorder the fields, enable/disable fields etc)
and in that case the PatNr:1 is causing a problem.
So I thought I solved that, by double-quoting PatNr:1,
and indeed it works.
So I would expect that I now can always double quote the selection fields,
but unfortunately that doesn't seem to be true.
From a graphical design, I get for instance:
SELECT "Opnamen.PatNr", "Opnamen.Datum"
FROM Patient
LEFT JOIN Opnamen
ON Opnamen.PatNr = Patient.PatNr
which doesn't work,
removing the double quotes here does work.
So I can think of the following solutions:
1. never double quote selection fields, unless there's a ':' or a space
in the name
2. always double quote selection fields, unless there's a '.' in it
Which one is the most general, or are there even better ways ?
Thanks,
--
cheers,
Stef Mientki
http://pic.flappie.nl
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------