Forum Replies Created

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

  • RE: Help with a join

    TSQL Tryer (9/1/2015)


    I've not designed the database or the table. I'm simply trying to get a report out of it

    In that case I suggest breaking out tableA in a temp...

  • RE: Help with a join

    You shouldn't have multiple CompanyID's stored this way. You'll want to normalize your data. You can't do joins that way unless the actual ID in tableB was "1,2,3,4".

  • 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...

  • 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...

  • 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...

  • 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,...

  • 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...

  • 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...

  • 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.

  • 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...

  • 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...

  • 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)

  • 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...

  • 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...

  • 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...

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