Hi Jim,
That all depends on what you mean by "work." First of all, you haven't
posted the whole SQL statement. A SQL statement begins with "SELECT,"
"UPDATE," "INSERT," "DELETE," and a few other commands. What you have posted
is the conditional clause of a SQL statement. Perhaps you know this, but I
can't presume that you do.
As for what I mean by "what you mean by 'work'," What I mean is that what
you've posted, as a WHERE clause, will "work," in that it will not throw an
error, unless one of the column names is misspelled, your data typing syntax
is incorrect, or if you're not querying the "Shipments" table. So, since I
don't know what you're after, I'll tell you what you've posted.
Shipments.Business_Unit > '[ ]'
This means that you are specifying the "Business_Unit" column of the
"Shipping" table.
It also means that the "Business_Unit" column is of a text data type.
Finally, it means that the value in the column must follow "[ ]" in
alphabetical order.
Shipments.Shipping_Group > '[ ]'
This means that you are specifying the "Shipping_Group" column of the
"Shipping" table.
It also means that the "Shipping_Group" column is of a text data type.
Finally, it means that the value in the column must follow "[ ]" in
alphabetical order.
Shipments.Shipper = N'ADP-Logistics'
This means that you are specifying the "Shipper" column of the "Shipping"
table.
It also means that the "Shipper" column is of a text data type.
Finally, it means that the value in the column must be equal to
'ADP-Logistics'
It also specifies Unicode as the character format for the string you're
comparing to.
A few remarks:
Punctuation marks, such as "[" and "]" are alphabetically lower than
numbers, which are alphabetically lower than characters. Therefore, "[ ]"
would be "less than" "[1]" as an example.
Whether the search is case-sensitive would depend on the collation order of
the database. If you want to be sure of case-insensitivity, use the LIKE
operator.
The AND operator indicates that both conditions (or, in your case, all)
must be met.
I'm assuming, mostly due to the use of the "N" Unicode specifier, that
you're using SQL Server, although there are other databases that support
this notation.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
Can someone tell me how to change the following query from SQL work in
front
page.
WHERE (Shipments.Business_Unit > '[ ]') AND (Shipments.Shipping_Group'[ ]') AND (Shipments.Shipper = N'ADP-Logistics')
This is all new to me
Thanks,
Jim