Forum Replies Created

Viewing 15 posts - 1,666 through 1,680 (of 8,731 total)

  • RE: Date logic

    What´s the problem with the code I posted?

  • RE: Date logic

    Maybe something like this:

    SELECT *,

    DATEADD(HH, DATEDIFF(HH, '2017', TestDate), '2017') PartitionUsed,

    DENSE_RANK() OVER(ORDER BY DATEADD(HH, DATEDIFF(HH, '2017', TestDate), '2017')) RN

    FROM @Sample;

  • RE: Is SQL Server 2008 and 2008 R2 completely separate versions?

    2008 and 2008R2 are two different products. Each of them have different releases and version numbers. They're very similar, but are different enough not to have been considered a Service...

  • RE: replace CASE statement with a table

    How about making this a persisted computed column using a UDF?

  • RE: Today's Random Word!

    Ed Wagner (1/9/2017)


    whereisSQL? (1/9/2017)


    aPed001 (1/9/2017)


    Manic Star (1/9/2017)


    eccentricDBA (1/9/2017)


    Ed Wagner (1/9/2017)


    DamianC (1/9/2017)


    Ed Wagner (1/9/2017)


    Ray K (1/6/2017)


    Manic Star (1/4/2017)


    ZZartin (1/4/2017)


    Terminator

    (I'll Be) back

    front

    Assault

    rifle

    Range

    Home (on the Range)

    Deer

    Hunter

    Hunted

    Dinner

    Served

  • RE: Renaming fields and combining them into one column

    drew.allen (1/9/2017)


    CELKO (1/7/2017)


    I see absolutely no benefit to having this as a check constraint rather than as a foreign key constraint.

    The check constraint can be used by the optimizer immediately;...

  • RE: Performance tuning for a query

    ChrisM@Work (1/9/2017)


    Or build a cross-tab into an APPLY block:

    I usually avoid APPLY with correlated suubqueries because it tends to run the query row by row. Obviously, this is a general...

  • RE: Performance tuning for a query

    mishrakanchan86 (1/9/2017)


    Hi ALl

    I have a view which looks something like below.

    Select

    * from T1 with(NoLock)

    Inner Hash Join T2 With (NoLck) on T1.PID = T2.PID

    Inner Hash Join...

  • RE: The Tally Table

    Jeff Moden (1/9/2017)


    Ed Wagner (1/9/2017)


    I've already voted for it as well. As of now, it's 244 to 5.

    You just have to wonder what was on the mind of the...

  • RE: how to get SSME.exe for sql server 2012

    Why do you want to use one specific version? Both can connect to any version.

    If possible, you should remove those SSMS versions and install SSMS 16.5 which is the latest...

  • RE: Flat table for parent child

    Something like this?

    SELECT

    pr.Title AS ProjectRoot , pr.ID AS ParentID,

    wf.Title AS WorkFlow , wf.ID AS WorkflowID,

    ...

  • RE: Insert as multiple rows from column

    Here's an option that you might want to consider. First, it removes unnecessary characters and changes the delimiters into something that shouldn't be part of your string. Then it uses...

  • RE: SSMS.exe starts sql server management studio 2008 instead of 2012

    anjaliagarwal5 (1/5/2017)


    Hi All,

    I am trying to create a local Instance. When I issue a command ssms.exe from the below directory. It always starts SQL server 2008 which is also installed...

  • RE: Split Function Usage for Multiple Multi-Select Parameters

    mikevessey (1/5/2017)


    why not use a TABLE VALUE PARAMETER in your stored proc

    simply use the CREATE TYPE statement (to create a table type), then create your proc using the table type...

  • RE: timeout issue

    I agree with Sue. You should do all this through T-SQL. If you prefer, you can use the GUI to build the code and use the bottom in the top...

Viewing 15 posts - 1,666 through 1,680 (of 8,731 total)