SELECT Account.id as "AccountID", Account.name, Account.accountnumber, Account.batch,…
Jump to turn (8)
- 1SELECT Account.id as "AccountID", Account.name, Account.accountnumber, Account.b
- 2This error I am getting for above query - Query failed: Cannot cast '2' to BOOLE
- 3Data.Workflow .a is integer type, If I make it to boolean it wont except 2 value
- 4SELECT Account.id as "AccountID", Account.name, Account.accountnumber, Account.b
- 5explain SELECT Account.id as "AccountID", Account.name, Account.accountnumber, A
- 6SELECT Account.id as "AccountID", Account.name, Account.accountnumber, Account.b
- 7explain SELECT Account.id as "AccountID", Account.name, Account.accountnumber, A
- 8Yes Data.Workflow.a is number of days so and data type is integer , WHat can i u
- User
SELECT Account.id as "AccountID", Account.name, Account.accountnumber, Account.batch, Account.additionalemailaddresses, contact.firstname, contact.lastname, contact.workemail, contact.personalemail, Invoice.amount, Invoice.balance, Invoice.duedate, Invoice.invoicedate, Invoice.invoicenumber, Invoice.status, Invoice.id, date_diff('day', Invoice.duedate, current_date) as "duedays", Subscription.id as "SubscriptionID", Subscription.name, Subscription.status FROM InvoiceItem IT JOIN Account on IT.accountid = Account.id JOIN Invoice on IT.invoiceid = Invoice.id JOIN contact on contact.id = Account.BillToId JOIN Subscription on IT.subscriptionid = Subscription.id WHERE (date_diff('day', invoice.duedate, current_date) = CAST(CAST('{{Data.Workflow.a}}' AS BOOLEAN) AS BIGINT) OR date_diff('day', invoice.duedate, current_date) = CAST(CAST('{{Data.Workflow.b}}' AS BOOLEAN) AS BIGINT) OR date_diff('day', invoice.duedate, current_date) = CAST(CAST('{{Data.Workflow.c}}' AS BOOLEAN) AS BIGINT) OR date_diff('day', invoice.duedate, current_date) = CAST(CAST('{{Data.Workflow.d}}' AS BOOLEAN) AS BIGINT) OR date_diff('day', invoice.duedate, current_date) = CAST(CAST('{{Data.Workflow.e}}' AS BOOLEAN) AS BIGINT)) AND Invoice.balance>0 AND Invoice.status = 'Posted' AND Account.Batch = 'Batch1'