Forum Replies Created

Viewing 15 posts - 4,711 through 4,725 (of 8,731 total)

  • RE: Using EXEC functions and temp tables

    Let me try to make some points clear.

    - What you're referring as Database, might actually be a Schema.

    - If you run your code as it is now (without...

  • RE: Database Mirroring Restrictions

    I hope that the wording for the answers could be corrected as there might have been translating issues or something (even if one could understand the intentions).

    Thank you for the...

  • RE: Why use Select 1

    Mike Aguilar (7/14/2015)


    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'Index name here' AND object_id = OBJECT_ID('Table Name Here')

    DROP INDEX ....

    I was just wondering why some people...

  • RE: SQL Syntax help for a DELETE statement

    sgmunson (7/14/2015)


    mw112009 (7/13/2015)


    Are you sure ? I am confused on the following

    DELETE

    FROM DEDUPE

    WHERE RID > 1;

    Should it be --->

    DELETE

    FROM AbC

    WHERE ???

    When a CTE exists, it...

  • RE: Picking Number String out of Text String

    I actually prefer this format.

    SELECT S.STRING, LEFT( t.newString, CHARINDEX(',', t.newString) - 1) AS NUM

    FROM @STRINGS AS S

    CROSS APPLY (SELECT SUBSTRING(S.STRING, CHARINDEX('resultid=', S.STRING) + 9, 8000)) t(newString)

  • RE: Expand coma separated values in field in select statement

    robert.wiglesworth (7/14/2015)


    Ok, thanks. That seems to work. But it seems complicated. Opinions on this please....

    If I am able to edit how the records in this table get entered, should I...

  • RE: DISTINCT + MIN

    That's great! I just wanted to make sure that you weren't over complicating yourself.

    I'm glad that you solved your issue.

  • RE: DISTINCT + MIN

    xanuyo (7/14/2015)


    Even The Management studio was trying to say this to me

    "Column 'NAME' is invalid in the select list because it is not contained in either an aggregate function or...

  • RE: Syntax Error IS NULL

    SolveSQL (7/14/2015)


    Apart from your syntax error (which i have not checked)

    what's the purpose of comparing same column from same table?

    ..."WHERE Loss_state = #tmpTotals.Loss_State"

    That's used to get a correlated subquery...

  • RE: DISTINCT + MIN

    You just need to use MIN() and GROUP BY.

    What have you tried? What problems have you encountered?

  • RE: Query Help - Replace multiple values without looping

    Will you really have that amount of data elements? You could simply code for each possible data element. It would be even better if you change the EAV design into...

  • RE: SQL for 8-year-old Math…But Be Careful of Implicit Type Conversion

    I would have loved if you referenced Data Type Precedence in the article to understand SQL Server decisions on implicit conversions.

  • RE: Are the posted questions getting worse?

    Lynn Pettis (7/13/2015)


    OMG! How does Silver Spoon keep his job? Member of ssc for over 10 years and can't seem to do the simplest tasks without running to the...

  • RE: Are the posted questions getting worse?

    GilaMonster (7/13/2015)


    Yes, yes, yes, yes!!!!!!!!

    Congratulations. You have complied with the requirements prescribed for your degree, and are cordially invited to the graduation ceremony

    Congratulations, Gail.

  • RE: Creating Buckets For Sales Data

    Another option, just in case that you want to have your information returned in a different way.

    WITH Groups(GroupID, GroupDesc) AS(

    SELECT 1, 'Count Less Than 5K' UNION...

Viewing 15 posts - 4,711 through 4,725 (of 8,731 total)