Re: [gnome-db] An issue and a question
- From: "Vivien Malerba" <vmalerba gmail com>
- To: "Phil Longstaff" <plongstaff rogers com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] An issue and a question
- Date: Sat, 9 Dec 2006 14:22:26 +0100
On 12/9/06, Phil Longstaff <plongstaff rogers com> wrote:
I am currently using libgda 1.99.1 and have an issue and a question.
The issue:
GDates are rendered into SQL as 'MM-DD-YYYY'. MySQL doesn't accept this
format. It wants 'YYYY-MM-DD'. I don't see any way to change this.
Libgda handles dates through the GDate structure to avoid depending on
a specific date format. The SQL rendering is done using GdaDataHandler
objects, which are created by each DBMS provider. In the case of
MySQL, I obviously need to modify that obbject to make the rendering
correct, which I'll do ASAP.
The question:
I want to build a GdaQuery to represent
SELECT * FROM table1 WHERE col1 IN (SELECT col2 FROM table2 WHERE ...)
I can build the subquery. I can build the main query. How do I connect
them so that the subquery takes part in the condition for the main
query?
I don't think this is possible right now, there is no query field to
allow for that, but it can be added.
However what you can do is:
query = gda_query_new_from_sql (dict, "SELECT * FROM table1 WHERE col1
IN (SELECT col2 FROM table2 WHERE...", error);
and then use the new GdaQuery, except that it is just stored
internally as SQL and you can't know much about it (for example can't
know the number of columns will be returned when you execute before
you execute it, etc).
Regards,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]