On Mon, Jun 14, 2010 at 11:51:07AM -0300, Israel Lins Albuquerque scratched on the wall: > Using the example above I see one not documented issue. When I use parameters > ?NNN and :AAAA or @AAAA or $AAAA , > in same query as above some of then will be omitted. I don't know if this is > the expected behavior or not. > > CREATE TABLE a (a, b); > CREATE TABLE b (a, b); > > INSERT INTO a VALUES (0, 1); > INSERT INTO a VALUES (1, 0); > INSERT INTO a VALUES (1, 1); > INSERT INTO b VALUES (0, 1); > INSERT INTO b VALUES (1, 0); > INSERT INTO b VALUES (1, 1); > > SELECT * > FROM a > JOIN b ON (a.a = b.a AND a.b = :b AND a.b = b.b) > WHERE a.a = ?1; > > In this query as 2 parameters but will be see like only one!
It is expected. Nearly all SQL interfaces work this way. It is a feature. The same value will be used in both locations in the query. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list email@example.com http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users