Sql Query Returns Too Many Records
I'm new to BarTender and I'm trying to set up a join and query to find a unique record for printing a dispatch label. I have 3 tables: Customer, Dispatch and Location. Dispatch contains a unique dispatch number as well as a customer number and location number. I've joined the tables with inner joins using Dispatch customer number; Dispatch location number on the left and and the corresponding customer and location fields on the right.
I have a query prompt to find one dispatch number. When that is run it finds all of the records for the customer. The SQL statement generated by BarTender is as follows:
SELECT DISTINCT "dbo"."Dispatch"."Dispatch", "dbo"."Dispatch"."RecDate", "dbo"."Dispatch"."Priority", "dbo"."Customer"."LastName", "dbo"."Location"."City", "dbo"."Location"."LocName" FROM "dbo"."Dispatch" , "dbo"."Customer" , "dbo"."Location" WHERE "dbo"."Dispatch"."CustNo" = "dbo"."Customer"."CustNo" AND "dbo"."Dispatch"."LocNo" = "dbo"."Location"."LocNo" AND ("dbo"."Dispatch"."Dispatch" = '?QueryPrompt1')
Any suggestions?
-
What type of database engine are you running? Is this something you could attach to this forum post using the "More Reply Options" together with the BarTender document?
Are you able to connect to this database from Excel and run the same type of join / query? If yes, what is the result?
0 -
I'm connecting to an SQL database. I've attached a copy of the document file and a my SQL connection data. The blank area on the label is where I would like to inset an object with a script that would pull data from three fields in a table named "DispParts" . Fields are "Quan" , "Prod" and "Desc" and would connect to the parent database with the "Dispatch" field.
Any help would be appreciated.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare