Re: SQL Query



I am selecting data and the Shipments.Business_Unit > '[ ]' is not a null,
but the field is empty along with the other field. What I am trying to do is
only get back fields where both have something in them.

Jim



"Kevin Spencer" wrote:

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.

"hrider1@xxxxxxxxxxx" <hrider1comcastnet@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:118B973D-67F6-4AA1-9941-4A5AF6741649@xxxxxxxxxxxxxxxx
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





.



Relevant Pages

  • Re: SQL Query
    ... Therefore, God exists. ... A SQL statement begins with "SELECT," ... This means that you are specifying the "Shipping_Group" column of the ... It also means that the "Shipping_Group" column is of a text data type. ...
    (microsoft.public.frontpage.programming)
  • Re: SQL Query
    ... A SQL statement begins with "SELECT," ... alphabetical order. ... This means that you are specifying the "Shipping_Group" column of the ... It also means that the "Shipping_Group" column is of a text data type. ...
    (microsoft.public.frontpage.programming)
  • Re: SQL Query
    ... "Kevin Spencer" wrote: ... A SQL statement begins with "SELECT," ... This means that you are specifying the "Shipping_Group" column of the ... It also means that the "Shipping_Group" column is of a text data type. ...
    (microsoft.public.frontpage.programming)
  • Re: How do you hide Columns in a SubForm
    ... RowSource, using a SQL statement, so i wouldn't be surprised that the ... Dim strSubformSQL As String, siteID As String ... the first thing i'd check would be the data type of the criteria fields. ...
    (microsoft.public.access.modulesdaovba)
  • Re: String value in where clause
    ... specifying the parameter type you avoid that potential issue. ... inferring the data type even in the desktop, but in any case specifying the ... these results in both my database and the Northwind database. ... the Customer ID and the select failed. ...
    (microsoft.public.sqlserver.ce)