Forum Replies Created

Viewing 15 posts - 526 through 540 (of 627 total)

  • RE: Are the posted questions getting worse?

    Sean Lange (6/23/2015)


    yb751 (6/23/2015)


    GilaMonster (6/23/2015)


    I'll probably be looking to get new kittens/cats later this year. My Siamese died late May, completely unexpected, out of the blue. One day she was...

  • RE: Are the posted questions getting worse?

    GilaMonster (6/23/2015)


    I'll probably be looking to get new kittens/cats later this year. My Siamese died late May, completely unexpected, out of the blue. One day she was fine, next day...

  • RE: [Msg 241, Level 16, State 1, Line 2]Conversion failed when converting date and/or time from character string.

    Can you provide an example of what 'last_occurrence_date' looks like before you try converting it?

    Assuming the format is valid...

    DECLARE @badDate INT = 20150623

    SELECT

    CONVERT(DATETIME,CONVERT(CHAR(8), @badDate)) AS GoodDate

    I'm assuming you commented out...

  • RE: SQL Server Recovery & Excessive Free Space

    If you haven't checked already I would suggest you look through your SQL Error Logs. Specifically during recovery or backups. It may provide some clues into some of...

  • RE: use case statement in PIVOT

    That part of the PIVOT is only expecting an Aggregate Function.

    If you look up CASE: https://msdn.microsoft.com/en-us/library/ms181765.aspx

    CASE can be used in any statement or clause that allows a valid expression. For...

  • RE: get sql error why , can I not use one with block with 2 update statements

    From MSDN:

    Specifies a temporary named result set, known as a common table expression (CTE). This is derived from a simple query and defined within the execution scope of a single...

  • RE: Splitting Column Value While Keeping Existing Data

    You can easily extract the strings with something like this, provided all of the data follows the same format.

    Cheers,

    DECLARE @postal_latlong NVARCHAR(50) = '66000/66100 42.696595 2.899370'

    SELECT

    @postal_latlong AS Original,

    SUBSTRING(@postal_latlong,0,CHARINDEX('/', @postal_latlong)) AS...

  • RE: Compare String

    I'm afraid you will need to be more specific. What 'String' are you trying to compare? Do you need help modifying your statement?

    Select Reson_id from reason_data where reason='ryete...

  • RE: Tricky hierarchy query

    lewisdow123 (6/19/2015)


    I could kick myself, I am running 2008 R2... so sorry

    LOL...well for what it's worth here is the final edit to my solution (for 2012) which has the output...

  • RE: Tricky hierarchy query

    lewisdow123 (6/19/2015)


    Thanks for your help, however I get this message

    'LAG' is not a recognized built-in function name.

    Did you post in the wrong forum? I assumed you were using SQL...

  • RE: Tricky hierarchy query

    Ok, well try my updated solution. The one problem I can see though is doesn't account for multiples problems relating to the same child. In your example you...

  • RE: Tricky hierarchy query

    Actually I didn't notice you have added a row number as I had started working on the problem from your first post. Give me a bit and I should...

  • RE: Tricky hierarchy query

    Ahhh thanks for the data, that's much better.

    I've come up with a solution but I'm not sure if it's necessarily the best. Also keep in mind this is based...

  • RE: Need code to list ID

    Jeff Moden (6/17/2015)


    adonetok (6/17/2015)


    One column (memberID) store about 100 member ID like below

    000001

    000002

    ...

    000100

    How to code to output like below?

    000001, 000002,...000100

    Your turn, please. Why do you need the data in...

  • RE: Error converting data type varchar to numeric

    I believe this was introduced in SQL 2012 feature but I thought it was interesting.

    However, as it is somewhat related I thought I'd mention it. I recently discovered this...

Viewing 15 posts - 526 through 540 (of 627 total)