Re: When comparing a field name with a column name of more than one word

From: BP Margolin (bpmargo@attglobal.net)
Date: 02/13/03


From: "BP Margolin" <bpmargo@attglobal.net>
Date: Thu, 13 Feb 2003 17:04:04 -0500


Fox,

The comparison should work just fine, regardless of the number of blanks in
the column.

Perhaps there is more than one blank between the first and last name in one
of the columns, but not the other?

While:

 'bob smith' always equals 'bob smith' (one blank in each string)

 'bob smith' never equals 'bob smith' (first string has two blanks between
the names, while the second string has only a single blank

Similarly, leading blanks can cause a non-match. Trailing blanks should not
affect equality tests.

-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.

"Fox" <fox @ connexions .net> wrote in message
news:urJkVO60CHA.1936@TK2MSFTNGP10...
> Do I need a special syntax for a comparison such as
>
> WHERE PromoterName = ThisPromoterName
>
> When ThisPromoterName is both a first and last name ?
> i.e. ThisPromoterName = bob smith
> All exmples in my books have a single word in the comparison.
> I can see that joining them with an undescore would work,
> but isn't there another way ? Actually I could swear it was
> alread working and that maybe I am entirley misguided
> by making a different mistake which is now effecting this part
> of the statement.
>
> Fox
>
>
>



Relevant Pages

  • Re: When comparing a field name with a column name of more than one word
    ... Incorrect syntax near 'Gabriel' ... leading blanks can cause a non-match. ... >> When ThisPromoterName is both a first and last name? ... >> All exmples in my books have a single word in the comparison. ...
    (microsoft.public.sqlserver.security)
  • Re: Copy/Fill cell values in a column
    ... In the active blank cell type an = sign then point to the cell above and hit ... Fox Brown Male ... would have blanks between Fox and Wolf, Brown and White, etc. ...
    (microsoft.public.excel.worksheet.functions)