Forum Replies Created

Viewing 15 posts - 2,596 through 2,610 (of 4,081 total)

  • RE: select query

    You can also get it done with a LIKE in your where clause if you read up on the various wildcard patterns. But if you restrict it to an...

  • RE: Character's position frm a string

    declare @input varchar(100)

    set @input = '000100010001'

    ;with tally (N) as (select row_number() over (order by id) from master..syscolumns)

    select N from tally

    where substring(@input,N,1) = '1'

    and N <= len(@input)

    edited to...

  • RE: Many to Many - selecting records that don't include a word

    Hey J-F,

    Your subquery solution is cleaner in that it avoids the uneccessary join to the item table to find the unwanted ItemIDs. The CTE solution should be...

  • RE: Many to Many - selecting records that don't include a word

    Thanks for posting the sample data!!! It made my job MUCH simpler. 🙂

    The following solution uses explicit JOINS because your use of the WHERE clause with a...

  • RE: New Datetime datatypes???

    Use CONVERT, because CAST doesn't give you all the formatting options.

    The new datatypes aren't necessary unless you want to disregard time or store really ancient dates. But you...

  • RE: New Datetime datatypes???

    The internal storage of date and datetime information is actually an integer datatype, not a character string. However, it is presented as character string when you do a...

  • RE: Trigger skipping entering 1st row on Insert

    Still don't see why what you have isn't working. But I do see that you are using a while loop in your parse function. ...

  • RE: Trigger skipping entering 1st row on Insert

    While waiting on the parsestring function to be posted, I will also ask if you have considered rewriting it as a parse to produce a derived table to feed the...

  • RE: Are the posted questions getting worse?

    Awwww... that's not true... I've got a couple thousand... errr dozen at most.

  • RE: Aging Query

    Hey Michelle 🙂

    If you didn't already know, Lynn is renowned for his patience to the point that he has often been called Saint Lynn by the regulars at SSC....

  • RE: Are the posted questions getting worse?

    Glad you like it, Lynn.

    Steve: Suggestion for new functionality... name/avatar history. 😀

  • RE: Are the posted questions getting worse?

    Humor is subjective. In some people's cases, it needs to be subjected to a baseball bat.

    Hey! I resemble that remark!

  • RE: Comparing 2 Months

    With the column changes in place, this works.

    declare @sample table (eligMonth dateTime, membID int)

    insert into @sample

    select '2009-07-01', 899931100 union all

    select '2009-07-01', 899931700 union all

    select '2009-07-01', 899931000...

  • RE: Comparing 2 Months

    You are right of course that it would be nice to have some sample data from the author of the question. For example, we don't know if a...

  • RE: Comparing 2 Months

    If a member can appear multiple times with multiple eligibility dates, and you are ONLY concerned about the current month and the previous month, then

    declare @sample table (member int,...

Viewing 15 posts - 2,596 through 2,610 (of 4,081 total)