Re: SQL Query



Thanks, everything works now

Jim

"Kevin Spencer" wrote:

Hi Jim,

In fact, ( > '[ ]' ) means "alphabetically after "[ ]". Now, when you say
"not a null," are you sure you mean a null, or a blank string? I ask because
they are entirely different. Here's the syntax for both:

WHERE columnName IS NOT NULL
WHERE columnName <> ''
WHERE columnName != ''

The second and third are functionally equivalent.

--
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:B0C05E86-9107-423C-B7DB-7F3655C8FEE3@xxxxxxxxxxxxxxxx
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
    ... 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: ASP SQL Statement
    ... Kevin Spencer ... >> single quotes around the value in your SQL Statement: ... >> ..Net Developer ... >>> Dim ID2 ...
    (microsoft.public.frontpage.programming)
  • Re: Reading MS Access Memo Field
    ... What do you expect the data type to be? ... Kevin Spencer ... Professional Numbskull ... I used the below code to get the information from a MS Access database ...
    (microsoft.public.dotnet.languages.csharp)