Query Prompt Creating Odd Where Condition For = Operator
Using the Database Connection Setup dialog, I've created a query with a field of 'Shipments.Shipment_ID', and operator of '=', and a criteria of '?EnterShipmentID'.
After providing a number like '1006' to the query prompt while printing a test label, I examined the log and noticed that it produces the follow WHERE condition:
WHERE (("Shipment_ID" >= 1005.95) AND ("Shipment_ID" >= 1006.05))
Querying for a range of numbers is certainly not the expected result when selecting the '=' operator.
I would expect nothing more or less than:
WHERE "Shipment_ID" = 1006
-
Shotaro Ito
★ BarTender Hero ★
That is normal match condition for double / float value.
Those values are not exact. For some reason bartender's db connection treat your "Shipment_ID" as floating point value. IDs are usually char / text type in data field - what is the data type of "Shipment_ID" in original table?
0 -
That is normal match condition for double / float value.
Those values are not exact. For some reason bartender's db connection treat your "Shipment_ID" as floating point value. IDs are usually char / text type in data field - what is the data type of "Shipment_ID" in original table?
The data source is a FileMaker database. Shipment_ID is defined as a number field. Since FM doesn't distinguish between number types when defining the field, it appears that ODBC driver describes the field as a decimal.
0 -
Shotaro Ito
★ BarTender Hero ★
Hmm.. for decimal, it looks a bit strange to compare like that way, however when input data is integer only, it wouldn't cause problem. If the comparison would cause any problem, consider using text/char type in table instead.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare