I am trying to use the value of a table cell in a WHERE clause:
SELECT SUM("invoiceTotal") AS lines_total, SUM("balanceOwed") AS lines_balance FROM "invoicesToCustomer" WHERE "invoiceNumber" = '{{invoicesTable.selectedRow.invoiceNumber}}'
SELECT SUM("invoiceTotal") AS lines_total, SUM("balanceOwed") AS lines_balance FROM "invoicesToCustomer" WHERE "invoiceNumber" LIKE {{'%' + invoicesTable.selectedRow.invoiceNumber + '%'}};
SELECT SUM("invoiceTotal") AS lines_total, SUM("balanceOwed") AS lines_balance FROM "invoicesToCustomer" WHERE "invoiceNumber" LIKE "%{{invoicesTable.selectedRow.invoiceNumber}}%";
@PatrickMast , no that won’t work, the part between {{}} is already being converted to a string with surrounding double quotes. The result would be “%”string”%”.
The way @haj did it is indeed the correct way to do this.