Weird select statement ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RSMEINER

    #16
    Re: Weird select statement ?

    >It doesn't work because you're confusing a string containing commas with an[color=blue]
    >array whose items happen to be separated by
    >commas.
    >
    >If you type the query out longhand, you'll see that you're passing an array
    >of values to the IN operator
    >SELECT foo
    >FROM bar
    >WHERE bar.foobar IN ('a', 'b', 'c') ;
    >
    >'a', 'b', 'c' is a tuple with three entries. You separate those entries with
    >a comma in standard SQL syntax.
    >
    >Now, when you referred to the column "SCHEDULE" in your query, you were
    >passing a single string value, 14 characters in
    >length, which happened to contain commas in positions 4 and 9. Not the same
    >thing at all....
    >
    >--
    >Paul Horan[/color]

    Some days it just doesn't pay to play with code.
    This is one of those days.

    Thanks.


    Randy

    Comment

    Working...