How To Set Field Alias In Bartender
SELECT
"Item"."No_" ,
"Item"."No_ 2" ,
("Item"."Description" + "Item"."Description 2") as Description,
"ILE"."Description" as [name] ,
"ILE"."Quantity" ,
"ILE"."Lot NO_" ,
"ILE"."Posting Date"
FROM
("dbo"."$Item" as "Item"
Left outer join "dbo"."$Item Ledger Entry" as "ILE" on "Item"."No_"="ILE"."Item No_")
WHERE
"ILE"."Document No_" = '?Job'
I have the above query, where I am selecting an Item (single records) and joining to the Item Ledger Entries (multiple entries). When I try to join two fields and give the result an alias, I receive an error during the print preview.
Database is Windows SQL Server 2013.
I can run the same query in SQL Server and it seems to work fine.
I have also tried the following variations;
Concat("Item"."Description" , "Item"."Description 2") as Description,
Concat("Item"."Description" , "Item"."Description 2") as [Description],
Concat("Item"."Description" , "Item"."Description 2") as 'Description',
Concat("Item"."Description" , "Item"."Description 2") as "Description",
("Item"."Description" + "Item"."Description 2") as Description,
("Item"."Description" + "Item"."Description 2") as [Description],
("Item"."Description" , "Item"."Description 2") as 'Description',
("Item"."Description" , "Item"."Description 2") as "Description",
Any assistance will be much appreciated.
0
-
Shotaro Ito
★ BarTender Hero ★
Below worked, so concatenation of field is fine.
SELECT ("NAME" + "CODE") AS "f1" FROM "S1"."DATA" WHERE "CODE"='?Q1'
So not sure the reason of the error - Alias "Description" already used in the query - could it be AS "Description1_2" etc?
Bartender's text / barcode object can have 2 or more data sources, so usually you don't need to concatenate fields in SQL.
Though you have option to use Custom SQL, try to avoid using Custom SQL. If that's can be done by creating view in SQL server, that's better connect to the view from BarTender.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar