Forum Replies Created

Viewing 15 posts - 481 through 495 (of 626 total)

  • RE: Looking for sql agent job monitoring solution

    I've used this for a long time. It's simple and it works. I have since made many tweaks to fit my requirements such as stripping out the CLR.

    You...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: General question concerning Users and allowing SQL queries on a database

    Jeff Moden (8/27/2015)


    Heh... you guys are all missing it. You should encourage all manner of ad hoc queries from the masses so that you can better justify a massive...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: handling odd date format

    Those are always a pain...no guarantee the INT is based on days since 1900-01-01. I once had to export data from a 'very' old legacy system which the date...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Huge difference between estimated rows and actual rows

    coolchaitu (8/21/2015)


    Sir is a respectful term of address. I am an entry level while you all are already in the dba field for years. Hence, as a token of courtesy,...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: ROW_Number Query

    mitzyturbo (8/7/2015)


    But why doesn't Partition By sp.Name order by sp.Name work in that regard?

    I've tried dumping the result set into a temp table and doing the same (removing any problems...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Job Details

    Well there are many different combinations a schedule can make so you have to be mindful of what exactly you want.

    Use this as a reference if you want to make...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: T-Sql question.

    Because you have multiple instances of object_id and you didn't specify which one to use. Just add the alias and it should work.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Replace multiple occurances of same character with a single character

    drew.allen (8/6/2015)


    You only need three replaces.

    WITH CTE(col) AS

    (

    SELECT

    'ServerCentral|||||forum|||||||||||||||is||||||the||best'

    UNION

    SELECT 'so||||||be|||||on||||||||||||||||||||||||||||||||||||||||||||it'

    UNION

    SELECT 'An||||additional|test||with|occurences||||of|a|||||single|||||pipe.'

    )

    SELECT REPLACE(REPLACE(REPLACE(col, '|', '|='), '=|', ''), '|', '')

    FROM CTE

    The previous solutions treat an odd number of pipes and an...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Are the posted questions getting worse?

    Raise your hands if you like Entity Framework...then I'll know who to shoot!

    Sorry just needed two seconds to vent. :crazy:

    I'm sure like anything else it can be fine when implemented...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Are the posted questions getting worse?

    Love it when the boss comes out and says you get to leave at 2pm! (we are heading into a long weekend here for context)


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Removing 00-00-00 from varchar Column in SQL table

    Luis Cazares (7/30/2015)


    yb751 (7/29/2015)


    Luis Cazares (7/29/2015)


    You conversion won't help as it will only truncate the string. It will basically do the same as the LEFT() function. Another problem it that...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: populate value in create sequence

    Have you tried Dynamic SQL? In a hurry but I threw this together.

    DECLARE @test-2 TABLE (SomeValue INT)

    INSERT INTO @test-2

    VALUES (2000),(2001),(2002)

    SELECT * FROM @test-2

    DECLARE @maxValue INT

    DECLARE @sqlstmt NVARCHAR(200)

    SET @maxValue =...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Removing 00-00-00 from varchar Column in SQL table

    Luis Cazares (7/29/2015)


    You conversion won't help as it will only truncate the string. It will basically do the same as the LEFT() function. Another problem it that 111 is not...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Removing 00-00-00 from varchar Column in SQL table

    sheaS (7/29/2015)


    Ok, awesome guys, I'll convert it to a date first then run these query's. Thanks a million. Will post results.

    If you're going to convert it then you don't actually...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Removing 00-00-00 from varchar Column in SQL table

    Well we had a REPLACE and a LEFT solution why not add a CONVERT. 😉

    DECLARE @mytable TABLE (myDate VARCHAR(20))

    INSERT INTO @mytable

    VALUES ('2015-07-28 00:00:00'),('2015-07-29 00:00:00'),('2015-07-30 00:00:00')

    SELECT * FROM @mytable

    UPDATE @mytable

    SET myDate...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

Viewing 15 posts - 481 through 495 (of 626 total)