Add Column with "Static" info - like table name
Posted: Fri 15 Nov 2019 17:27
Using Quickbooks Addin:
I am trying to add a column to a select statement that contains fixed information so that I can differentiate between two tables in the data. For example, I want the last column to say "Bills" for every entry, but I can't find the correct syntax. Here is an example select statement:
SELECT t.Id,
BillId.TxnDate AS "Trans Date",
BillId.DocNumber AS "Num",
BillId.VendorRefName AS "Vendor",
t.Description AS "Memo",
t.Amount AS "Amount",
t.AccountBasedExpenseLineDetail_AccountRefName AS "Account",
t.LineNum AS "Line #"
FROM BillLineItem AS t
LEFT OUTER JOIN Bill AS BillId ON t.BillId = BillId.Id
WHERE ((BillId.TxnDate BETWEEN '2019-01-01 00:00:00' AND '2019-12-31 00:00:00'))
I am trying to add a column to a select statement that contains fixed information so that I can differentiate between two tables in the data. For example, I want the last column to say "Bills" for every entry, but I can't find the correct syntax. Here is an example select statement:
SELECT t.Id,
BillId.TxnDate AS "Trans Date",
BillId.DocNumber AS "Num",
BillId.VendorRefName AS "Vendor",
t.Description AS "Memo",
t.Amount AS "Amount",
t.AccountBasedExpenseLineDetail_AccountRefName AS "Account",
t.LineNum AS "Line #"
FROM BillLineItem AS t
LEFT OUTER JOIN Bill AS BillId ON t.BillId = BillId.Id
WHERE ((BillId.TxnDate BETWEEN '2019-01-01 00:00:00' AND '2019-12-31 00:00:00'))