On 3/07/2009 7:08 AM, Ed Hawke wrote:
> 
> Out of interest, would I be able to use binding on the run-time defined 
> fields?
> 
> If I wanted to use:
> 
> select * from A
>     join B b1 on (A.Column3 = b1.ID)
>     join C c1 on (b1.Column1 = c1.ID)
>     join D d1 on (b1.Column2 = d1.ID)
> 
>     join B b2 on (A.Column4 = b2.ID)
>     join C c2 on (b2.Column1 = c2.ID)
>     join D d2 on (b2.Column2 = d2.ID);
> where d2.ID = ?
> 
> Would that work?

If we had an explicit literal, e.g. "where d2.ID = 1234", would that 
work? Of course it would work.

Here's the scoop: you can have a binding parameter anywhere you can have 
a literal. It's that simple.

HTH,
John
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to