Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 1,957 total)

  • RE: Remove duplicate records based on record id, annoying GROUP BY statement

    petervdkerk (11/30/2010)


    @mister.magoo: Love the comments in your code 🙂

    As you mentioned you do provide the ouput as well: output deleted.*

    But im still unsure which command to use to select the...

  • RE: Remove duplicate records based on record id, annoying GROUP BY statement

    Brandie Tarvin (11/30/2010)


    mister.magoo (11/29/2010)


    @Brandie and GSquared,

    There were additional requirements in the OP's question - and while it is helpful to have your excellent input, you are not addressing the OP's...

  • RE: Remove duplicate records based on record id, annoying GROUP BY statement

    @Brandie and GSquared,

    There were additional requirements in the OP's question - and while it is helpful to have your excellent input, you are not addressing the OP's problem.

  • RE: Baffling DATEPART("dw"...) difference for day of week

    I suspect a language setting on the user that your SSIS package is using to log in to SQL server.

    Probably you are using a different login in SSMS than SSIS...

  • RE: Remove duplicate records based on record id, annoying GROUP BY statement

    petervdkerk (11/27/2010)


    Mister Magoo, that is indeed what the output is supposed to be (also my thanks to LutzM)!

    I ran your query and it marks the correct records for deletion.

    1 question:

    you...

  • RE: MAX in LINQ to EF

    Jack Corbett (11/29/2010)


    mister.magoo (11/23/2010)


    Agreed - but - just being Devil's Advocate's Advocate here - that only applies if the data source behind all the nice strongly typed entities is SQL...;-)

    True,...

  • RE: Stupid Question: Return Object Explorer to It's original position

    Not a stupid question at all!

    Just grab the Object Explorer windows and drag it until a blue cross appears. Continue dragging the window and point your mouse at the different...

  • RE: Remove duplicate records based on record id, annoying GROUP BY statement

    I think it should only delete rows with id in 4, 5, 7, 9

    It would help of course if we had expected results 😉

    Here is my version (which is...

  • RE: Conditional Order By

    Gopinath Srirangan (11/25/2010)


    Thanks for posting this.

    I am new to SQL server programming. Though both question and answer was clear i would like to know the reason or why SQL...

  • RE: String Replacement in XML datatype

    You're welcome, but I do not understand your last comment, unless you mean the ordering of the namespaces in the resulting xml is different?

  • RE: String Replacement in XML datatype

    Sorry - it's because I left out the other namespaces... try this:

    DECLARE @t table ( xml_text xml)

    INSERT INTO @t

    SELECT '<Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/ReportParameters.xsd"><Fields><Field FieldStub="D51C8428-8436-40B8-A1B0-FE1EC2C24401" FieldName="Product Code" FieldType="512" /></Fields><Prompts><Prompt PromptName="DateRangePrompt"><Param ParamName="@timezoneid"...

  • RE: String Replacement in XML datatype

    DECLARE @t table ( xml_text xml)

    INSERT INTO @t

    SELECT '<Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/ReportParameters.xsd"><Fields><Field FieldStub="D51C8428-8436-40B8-A1B0-FE1EC2C24401" FieldName="Product Code" FieldType="512" /></Fields><Prompts><Prompt PromptName="DateRangePrompt"><Param ParamName="@timezoneid" ParamValue="35" /><Param ParamName="@enddate" ParamValue="09/21/2006" /></Prompt><Prompt PromptName="SessionTypePrompt"><Param ParamName="@session_type" ParamValue="1" /></Prompt></Prompts><Filters><Filter FieldStub="9c312bdb-b9ee-4a06-9ab7-84357e22a7e2" OpId="4"...

  • RE: variable assignment to SELECT, and empty result sets

    tommyh (11/24/2010)


    mister.magoo (11/24/2010)


    Oh yes and, of course you should not do this:

    SELECT @variable1 = (SELECT column1 FROM table WHERE column2 = 'somevalue')

    unless you want an error for selecting multiple rows...

  • RE: variable assignment to SELECT, and empty result sets

    Oh yes and, of course you should not do this:

    SELECT @variable1 = (SELECT column1 FROM table WHERE column2 = 'somevalue')

    unless you want an error for selecting multiple rows in a...

  • RE: variable assignment to SELECT, and empty result sets

    I can't say I have a "pattern" for checking for this - you either spot it or you don't...

    However, there is another gotcha here that I see a lot of...

Viewing 15 posts - 1,711 through 1,725 (of 1,957 total)