Forum Replies Created

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

  • RE: Hi ,how to code the below procedure with loop.

    skmoh2 (1/10/2017)


    i have two tables.

    Table1

    --------

    PeggingSKU QTY RDD ComponentAvilable QtyAvlbl Dte Material Available Date

    SO1 ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Date logic

    What´s the problem with the code I posted?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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;

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: replace CASE statement with a table

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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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;...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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,

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

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