I done a path to make this works, if someone wants! Now...
CREATE TABLE a (a, b); INSERT INTO a VALUES (0, 0); INSERT INTO a VALUES (0, 1); INSERT INTO a VALUES (1, 0); INSERT INTO a VALUES (1, 1); SELECT * FROM a WHERE a.a = :a AND a.b = ?1; SELECT * FROM a WHERE a.a = ?1 AND a.b = :b; Have the same behavior! |Index: D:/FS_trunk/devpalm_01/poli_sqlite_lib/src/expr.c |=================================================================== |--- D:/FS_trunk/devpalm_01/poli_sqlite_lib/src/expr.c (revisão 323) |+++ D:/FS_trunk/devpalm_01/poli_sqlite_lib/src/expr.c (cópia de trabalho) |@@ -557,9 +557,21 @@ | sqlite3ErrorMsg(pParse, "variable number must be between ?1 and ?%d", | db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER]); | } |- if( i>pParse->nVar ){ |- pParse->nVar = i; |+ |+ // give to expression parameter with same index, another number to avoid conflicts |+ // with named parameter (:AAA, $AAA, @AAA) and indexed parameter (?NNN) |+ for(i=0; i<pParse->nVarExpr; i++){ |+ Expr *pE = pParse->apVarExpr[i]; |+ assert( pE!=0 ); |+ if( pE->iColumn==pExpr->iColumn ){ |+ pE->iColumn = (ynVar)(++pParse->nVar); |+ break; |+ } | } |+ |+ if( pExpr->iColumn>pParse->nVar ){ |+ pParse->nVar = pExpr->iColumn; |+ } | }else{ | /* Wildcards like ":aaa", "$aaa" or "@aaa". Reuse the same variable | ** number as the prior appearance of the same name, or if the name -- 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