Forum Replies Created

Viewing 15 posts - 1,141 through 1,155 (of 8,731 total)

  • RE: Need some pointers in the right direction Excel to SQL

    Thom A - Thursday, July 6, 2017 6:29 AM

    Luis Cazares - Thursday, July 6, 2017 6:24 AM

    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: Dynamic SQL

    Darko Martinovic - Thursday, July 6, 2017 12:50 AM

    Thank's the author for this question.
    In the real world, this script would end with...

    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?

    DesNorton - Wednesday, July 5, 2017 10:08 PM

    Brandie Tarvin - Wednesday, July 5, 2017 8:48 AM

    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 some pointers in the right direction Excel to SQL

    Thom A - Wednesday, July 5, 2017 7:59 AM

    SQL Server is not a cheap purchase, and it's not something you just...

    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: Please help on reformatting this table into another format using TSQL

    Read the table only once 😉

    SELECT CAST( WorkDate AS datetime) + CAST(WorkTime AS datetime)
       + CASE WHEN Starttime > Endtime THEN 1 ELSE...

    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: Order by Clause in Union

    Why are we overcomplicating this?

    SELECT left(datename(month,OrderDate),3)As Mnth, ID as ProductID,Project_No,OrderDate
    FROM T2
    order by month(OrderDate);

    Is there a reason to use all those...

    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: Can't trim last character of string

    Complementing what Eirikur said, you should read this article: Creating a comma-separated list (SQL Spackle) - SQLServerCentral
    Here's an example on what you're trying to achieve. Note that...

    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?

    Brandie Tarvin - Wednesday, July 5, 2017 8:48 AM

    Speaking of excellence... If someone puts "expert at ..." on their resume, how large...

    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: Reading from a view intoa table is taking forever!

    Did you try Lowell's suggestion?

    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: Reading from a view intoa table is taking forever!

    You mention that you have 2 linked servers.
    Where's newDB, myview and its underlying tables? Where are you running the code from?

    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: Total column in SQL Dynamic Pivot

    Gordon Barclay - Monday, July 3, 2017 7:50 AM

    I did try to do this via cross tab but could not get...

    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: Group sum is wrong

    Without more information, I can't be of much help.

    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: Running total for previous 7 values where there is a 1

    Using Lowell's code, I just added logic to return only when the 1's are consecutive.

    WITH MyCTE([Site],[MonthYr],[LongRun])
    AS
    (
      SELECT 'A',CONVERT(date,'Jan 1, 2016'),CONVERT(bit,'1') UNION ALL
     ...

    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: Total column in SQL Dynamic Pivot

    This is one of the reasons I prefer to use cross tabs.

    DECLARE @cols    AS NVARCHAR (MAX),
                @query AS NVARCHAR (MAX)
    SELECT    @cols = STUFF((SELECT ',SUM( CASE WHEN...

    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: Group sum is wrong

    i756311 - Monday, July 3, 2017 2:06 AM

    Hello,

    i have one question:
    My Report has three Groups. For the Detail Group i use following...

    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,141 through 1,155 (of 8,731 total)