It appears that variable binding in compound statement is not supported well.
E.g.
- Below statement is not working. The data is not updated at all.
DB.exec("UPDATE [Table] SET [Field1] = 'New' WHERE ( [Field2] = ( SELECT [Field2] FROM [Table] WHERE [Field3] = '?' ))", ['aaa']);
- If we remove the variable binding, then it works.
DB.exec("UPDATE [Table] SET [Field1] = 'New' WHERE ( [Field2] <= ( SELECT [Field2] FROM [Table] WHERE [Field3] = 'aaa'' ))");
- We also tested that below statement is working.
DB.exec("UPDATE [Table] SET [Field1] = 'New' WHERE ( [Field3] = ? )", ['aaa']);
That means variable binding in compound statement (UPDATE statement containing one SELECT statement) is not supported properly in alasql.
Is this a defect in alasql, or do I miss anything?
Any help or hint would be appreciated.
Update from AlaSQL team: See problem in this jsfiddle: http://jsfiddle.net/1w5mL0we/
It appears that variable binding in compound statement is not supported well.
E.g.
That means variable binding in compound statement (
UPDATEstatement containing oneSELECTstatement) is not supported properly in alasql.Is this a defect in alasql, or do I miss anything?
Any help or hint would be appreciated.
Update from AlaSQL team: See problem in this jsfiddle: http://jsfiddle.net/1w5mL0we/