Forum Replies Created

Viewing 15 posts - 976 through 990 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    If anyone has any info on this, please let me know.
    https://www.sqlservercentral.com/Forums/1897898/Filtered-Index-on-a-Temp-Table-in-a-Stored-Proc-can-result-in-a-Error-602

    Also, today is the 32nd anniversary of the most devastating earthquake that Mexico has faced, and...

    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: difference between early start date and recent end

    Papil - Tuesday, September 19, 2017 9:32 AM

    Thanks got it to work.

    It's considered good practice and polite to share your solution...

    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: difference between early start date and recent end

    That's easy using MIN, MAX and DATEDIFF. What have you tried?

    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: Calculating the Tally

    Aaron N. Cutshall - Monday, September 18, 2017 2:29 PM

    Luis,

    I have to admit that I've never seen the VALUES clause used...

    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 ROWS UNBOUNDED PRECEDING on CTE to work With SQL Server 2008

    luissantos - Monday, September 18, 2017 1:53 PM

    drew.allen - Monday, September 18, 2017 1:08 PM

    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: Calculating the Tally

    Why would everyone read the table twice instead of just unpivoting it?

    WITH myBeers AS(
      /* snippet */
      )
    SELECT Person, SUM(OwedBeer) NetBeerOwed
    FROM myBeers...

    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?

    Jeff Moden - Thursday, September 14, 2017 5:36 PM

    Steve Jones - SSC Editor - Thursday, September 14,...

    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: DateTime Field Hide time if it is midnight

    Using Lowell's sample data, here are 2 other options.

    SELECT [create_date],
       LEFT( CONVERT( varchar(24), [create_date], 121),
          CASE WHEN [create_date] = DATEADD(dd, DATEDIFF(dd, 0,...

    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: DateTime Field Hide time if it is midnight

    gtjr92 - Thursday, September 14, 2017 1:54 PM

    I need a query to hide the time from a datetime field if the time...

    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 string

    For this, I might keep a more straightforward approach.

    SELECT LEFT( YourFieldName, CHARINDEX('[', YourFieldName + '[')-1),
       SUBSTRING( YourFieldName, CHARINDEX('[', YourFieldName + '[')+1, CHARINDEX(',', YourFieldName +...

    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: pivot

    Read the following articles about dynamically pivoting tables:
    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - SQLServerCentral
    Cross Tabs and Pivots, Part...

    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 string

    sql_2005_fan - Thursday, September 14, 2017 10:47 AM

    Hi,

    I have string with streetname ,city and state in the following folrmat.

    I need to split...

    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: Heat Maps

    andrew_dale - Wednesday, September 13, 2017 1:46 AM

    The answer was the title!
    However it wasn't obvious what language this was for. Only spotted...

    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?

    jasona.work - Thursday, September 14, 2017 5:19 AM

    Time for something completely unrelated to SQL, although if anyone is in Atlanta, GA next...

    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: Finding Consecutive Values For a Record

    TheSQLGuru - Wednesday, August 30, 2017 6:00 PM

    I sure hope someone can do some benchmarking on these!! :Whistling:

    Here's a quick test. It...

    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 - 976 through 990 (of 8,731 total)