Once more detail... 

Doing this... 

SELECT * 
FROM a 
WHERE a.a = :a 
AND a.b = ?1; 

and this... 

SELECT * 
FROM a 
WHERE a.a = ?1 
AND a.b = :b; 

Will have different behavior! 



----- Mensagem original ----- 
De: "Israel Lins Albuquerque" <israel...@polibrasnet.com.br> 
Para: "sqlite-users" <sqlite-users@sqlite.org> 
Enviadas: Segunda-feira, 14 de Junho de 2010 11:51:07 
Assunto: [sqlite] Parametrized Queries issue (Possible bug) 

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! 

-- 

Atenciosamente/Regards, 

Israel Lins Albuquerque 
Desenvolvimento/Development 
Polibrás Brasil Software Ltda. 


_______________________________________________ 
sqlite-users mailing list 
sqlite-users@sqlite.org 
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users 


-- 

Atenciosamente/Regards, 

Israel Lins Albuquerque 
Desenvolvimento/Development 
Polibrás Brasil Software Ltda. 


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to