Forum Replies Created

Viewing 15 posts - 151 through 165 (of 1,957 total)

  • RE: Suggestion/solution for using Hashbytes across entire table

    Eric M Russell (10/7/2015)


    mister.magoo (10/6/2015)


    I don't know whether your setup would suit this, but how about converting to xml , then using hashbytes?

    select MBT.refID,

    hashbytes('MD5',(select MBT.* from (values(null))foo(bar)...

  • RE: Convert SQL table to XML

    IMHO trying to use XML to format this is more trouble than it's worth.

    A bit of VARCHAR works nicely though.

    CREATE TABLE #Temp

    (

    [Column A] VARCHAR(10),

    [Column B] VARCHAR(5),

    [Column C] VARCHAR(10)

    )

    INSERT INTO #Temp...

  • RE: Suggestion/solution for using Hashbytes across entire table

    I don't know whether your setup would suit this, but how about converting to xml , then using hashbytes?

    select MBT.refID,

    hashbytes('MD5',(select MBT.* from (values(null))foo(bar) for xml auto)) as...

  • RE: Make a column immutable, once set it sticks

    It gets even more problematic if CustID can be/is updated, then Scott's trigger won't work either, as the join between INSERTED and DELETED will not return the rows for the...

  • RE: Ensuring 1 of 2 parameters is populated

    jared.smith (10/4/2015)


    This is exactly what I'm after. Thanks for that.

    It works fine if both filters do not look up a data set for their available values. If one...

  • RE: Limiting Export Options Per Report

    I don't think there is any way to restrict the options in the drop down, but if you are happy to just make it not export for the other options,...

  • RE: Ensuring 1 of 2 parameters is populated

    This works, but may not look the way you want...

    Create your two parameters and allow both to have blank or null values.

    Create a Dataset, with this Query:

    select case when nullif(@p1,'')...

  • RE: This beautiful problem, which I call “impossible”

    And another answer comes out as x=4 and y=13.

    Also, not great for performance, but shows a different technique.

    /* Puzzle from SSC

    http://www.sqlservercentral.com/Forums/Topic1723602-391-1.aspx

    The beautiful problem:

    ...

  • RE: Display new lines in columns instead of Rows

    Perhaps if you provide some sample data and the output required we could help, but as it is, the title doesn't really help.

    All I can offer so far is that...

  • RE: How to resolve SQL Client Timeouts?

    Are these connection timeouts or query timeouts?

  • RE: Linked Server Performance

    One thing that is easy to fix is the WHERE clause from the last remote query, the one in this section:

    -------------------------Warehouse Adjustments and AM Pickups 5/29/2014 Sue Klotz

    You have this:

    WHERE...

  • RE: Linked Server Performance

    mceventphoto (9/24/2015)


    Hi mister.magoo Kristen-173977,

    Thanks for the suggestions. I checked permissions and everything is okay there. Collation is the same on old and new server, include the column collations. Local DB...

  • RE: SQL Query

    select ID

    FROM #table

    group by ID

    having count(distinct value)>1;

    Oops misread the requirement

    select base.ID,base.value

    from #table base

    join (

    select grp.ID

    FROM #table grp

    group by grp.ID

    having count(distinct grp.value)>1

    ) mto -- More Than One

    on mto.ID = base.ID;

  • RE: Linked Server Performance

    Assuming you have the properties of the Linked Server matched on the old and new servers, it could be down to...

    1. Permissions - the login that is used to access...

  • RE: I think this is a Check Constraint question.

    jameslauf (9/23/2015)


    I am sorry I re-Read my original post and i was unclear.

    I want individual LineitemNumbers per each InvoiceId.

    so I cna have Invoice#97865 with LineItemNumbers 1,2,3.

    right now I...

Viewing 15 posts - 151 through 165 (of 1,957 total)