Forum Replies Created

Viewing 15 posts - 2,431 through 2,445 (of 8,731 total)

  • RE: How can I find where the table is ? Which database ?

    Or you could try SQL Search (free product): http://www.red-gate.com/products/sql-development/sql-search/

    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: T-SQL formatting tool

    J Livingston SQL (7/26/2016)


    well you could always do it online at http://poorsql.com/...maybe a few more key strokes ( cut and paste ) but if its important what the heck 🙂

    I...

    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 calculate YTD from Given From date ?

    Just a small correction to J Livingston's query to avoid scanning the whole table.

    SELECT

    Custmer,

    location,

    SUM(CASE WHEN [Date] >= @mth_st...

    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!

    djj (7/26/2016)


    TomThomson (7/24/2016)


    Jeff Moden (7/24/2016)


    Hugo Kornelis (7/22/2016)


    Ed Wagner (7/22/2016)


    djj (7/22/2016)


    whereisSQL? (7/22/2016)


    crookj (7/22/2016)


    Ed Wagner (7/22/2016)


    Luis Cazares (7/22/2016)


    Grumpy DBA (7/22/2016)


    Revenant (7/22/2016)


    Ed Wagner (7/22/2016)


    Luis Cazares (7/22/2016)


    crookj (7/22/2016)


    Red

    Blue

    Sky

    Rainbow

    Pot o' gold

    leprechaun

    Irish

    Pub

    Brawl

    Fisticuff

    Fight

    That will give you 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: Work with CTE when data itself has discrepency(infinite loop.

    It's actually a leftover from when I had to process the whole table at once. It's taking the GroupID value from the parent node and comparing it each child to...

    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: Work with CTE when data itself has discrepency(infinite loop.

    ah0996 (7/25/2016)


    Hi,

    I need help with my CTE; All I need to find is the match between groupID and memberID and set nodelevel; once the result is...

    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: Double hyphen behavior in stored procedure numeric parameter

    lynns (7/25/2016)


    Thanks. I understand the comment portion. What has me confused/concerned is that a stored procedure with a parameter of data type float will take a non-numeric value...

    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: Duplicate in multiple columns

    That should be a lot simpler.

    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: Double hyphen behavior in stored procedure numeric parameter

    Double hyphens define a single line comment. Everything to the right of them will be ignored.

    --This is a single-line comment

    /*

    This is

    a multi-line

    comment

    */

    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: Get date from midnight to midnight

    drew.allen (7/25/2016)


    Alternatively, you could cast your DATETIME data as DATE and compare those.

    WHERE CAST(DateCol AS DATE) = CAST(DATEADD(DAY, -1, GETDATE()) AS DATE)

    Since CASTing from DATETIME to DATE is still SARGable,...

    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: Better method for computed column?

    What are you using the product_stat table for? Will you have more than a row per product? Will it keep history? If it'll always show the products in orders, maybe...

    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: Duplicate in multiple columns

    CREATE TABLE #SampleDuplicates(

    A int,

    B varchar(10),

    C varchar(10),

    D ...

    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: T-SQL syntax support help needed

    You have 2 variables named @res. One inside the dynamic code, and one outside. The one inside the dynamic code is lost and the one outside is printed but never...

    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: Are the posted questions getting worse?

    Alan.B (7/25/2016)


    Maybe it's Monday a Monday morning thing but even the small things are annoying me today. Just ran accross this:

    [Gender] varchar(100) NULL,

    It's obviously meant to include the whole gender...

    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: Need Help! ETL Stored Procedure Used to Work but Now Very Slow

    If a daily backup is enough for this database, I'd suggest to change the recovery mode to simple. Be sure that you don't have any uncommitted transactions that would prevent...

    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 - 2,431 through 2,445 (of 8,731 total)