Forum Replies Created

Viewing 15 posts - 1,276 through 1,290 (of 1,473 total)

  • RE: convert a varchar(4000) to a int !?

    christophe.bernard (10/23/2008)


    where condition in (CAST(int), @PostionsList)

    Christophe

    I just went back and re-read this thread, and realized that we might all be overthinking this one. If all you want to do...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    Ahhhh. I get it. I QUIT... but I get it. (I don't even understand that commercial and I just used it. :ermm: )

    So... to summarize:...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    rbarryyoung (10/24/2008)


    select obitno, oaorsc

    from hsdet inner join hshed on obhssq=oahssq

    where oainvd>20050100

    and convert(int,oaorsc)=@wh

    The reason that this does not work is because the order that clauses appear in the WHERE section does...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    Yeah, and it'll still bug me until I figure out why it's not working. I thought it might have been similar to the tally issue from yesterday, but so...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    Lynn Pettis


    Then I'd try this:

    select

    obitno,

    oaorsc

    from

    hsdet

    inner join hshed

    ...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    Can you do this?

    DECLARE @wh char(2)

    SET @wh = '1'

    SET @WH = CASE WHEN LEN(@WH) = 1 THEN '0' + @WH ELSE @WH END

    select obitno, oaorsc

    from hsdet inner join hshed on...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    What are the results of this:

    SELECT DISTINCT oaorsc

    FROM hsdet inner join hshed on obhssq=oahssq

    where oainvd>20050100

    If the list is reasonably short, post the whole thing.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Concat data from two records in same query

    Lynn Pettis (10/24/2008)


    Well, after fixing a couple of inconsistencies in the code (the system I am using is case sensitive so CoPay <> Copay, DateofBirth <> DateOfBirth, etc) I get...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    Did you try adding the AND ISNUMERIC(oaorsc) = 1 to your CTE?

    There are many ways of accomplishing this, the key is finding the most efficient.

    eg. Selecting only numeric rows...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Wierd Counter!

    Nah, I just abuse my poor refresh button. (And have RSS feeds to Trillian) 😎

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    I wasn't saying to put ISNUMERIC into your original query, only to check that all data above that breakpoint of 20050100 WAS numeric. (IE. Run that select and see...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Filtered Out Results Still Interfering w/Query

    This isn't necessarily the problem, but for arguments sake, run this:

    SELECT *

    FROM hsdet inner join hshed on obhssq=oahssq

    where oainvd>20050100 AND NOT ISNUMERIC(oaorsc) = 1

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: t-sql using either table-a ot table-b

    Did you test that Source wasn't a table? :hehe:

    Do you mean this?

    SELECT COALESCE(A.ID, B.ID)

    FROM TableA A

    FULL OUTER JOIN TableB B ON A.ID...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: t-sql using either table-a ot table-b

    My original post assumed a starting table, which is what "Source" intended to represent. It wasn't intended to be literal ;).

    P.S. Barry, that Select is messed up.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Wierd Counter!

    Jeff Moden (10/24/2008)


    ggraber (10/24/2008)


    Jeff Moden (10/24/2008)


    ggraber (10/24/2008)


    P.S. You may want to read Jeff's cool article on Running Totals which explains how this approach works http://www.sqlservercentral.com/articles/Advanced+Querying/61716/

    Heh... that's where I was going...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 15 posts - 1,276 through 1,290 (of 1,473 total)