Forum Replies Created

Viewing 15 posts - 676 through 690 (of 8,731 total)

  • RE: How to distinct values and adding row numbers while keeping original order?

    Get the min ID, group by code and order by min ID.

    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: Creation of a temporal table

    George Vobr - Thursday, February 15, 2018 8:33 AM

    Great question, thanks Evgeny. But I'm not sure if parameter SYSTEM_VERSIONING = ON must...

    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: Genreal Query Question

    Then you have multiple options:
    Preaggregate using a derived table or CTE:

    SELECT W.ID,
       W.Group,
       SUM( WD.Payment) AS TotalPayment,
       ...

    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: Genreal Query Question

    Don't aggregate the values on your Widget table, just group by them.

    SELECT W.ID,
       W.Group,
       SUM( WD.Payment) AS Payment,
       ...

    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: Business Day Function - Count today as 1

    I find that it's easier to learn about Tally Tables in this article from Dwain Camps:
    Tally Tables in T-SQL « dwaincsql

    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: Training?

    MyDoggieJessie - Wednesday, February 14, 2018 10:57 AM

    I'm not sure if this is the proper place to post this but I'm sure...

    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 delete this post

    If you want to have any chance of being helped. I suggest that you start with the best practices to post in forums.
    How to Post Performance Problems...

    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: A Simple Introduction to Dynamic SQL

    One simply does not introduces Dynamic SQL
    without a section on how to prevent SQL Injection.

    The basic changes are simple enough to include them in...

    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 find all stored procs using a table, but ignore comments?

    Jane777 - Monday, February 12, 2018 1:30 PM

    hi.
    we have 1 server with multiple databases.. The data tables are mostly inside database A.....

    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: #Error when converting HH:MM:SS to seconds using expression

    Have you tried something like this?

    (left(Fields!SLAHours.Value,Len(Fields!SLAHours.Value)-6)*3600)
    +(mid(Fields!SLAHours.Value,Len(Fields!SLAHours.Value)-4,2)*60)
    +(right(Fields!SLAHours.Value,2))

    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: Count from joins

    This should be an improvement.

    select DEP_Code, DEP_Name, cast(0 as bit) Favourite,
      case
      when DEP_Code = 'ACHR' then 7
      when DEP_Code = 'IT' then...

    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 time conversion.

    wwright 50911 - Friday, February 9, 2018 10:29 AM

    I am working on an SSRS report and the query I am using returns...

    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: oracle quctions

    psmahesh115 - Thursday, February 8, 2018 5:33 PM

    Luis Cazares - Thursday, February 8, 2018 6:01 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: EXISTS/ ALL?

    Maybe this is a simpler solution:

    SELECT *
    FROM dbo.Candidate AS c
    WHERE c.candidate_id NOT IN(
            SELECT c.candidate_id
            FROM dbo.Candidate AS c
            CROSS JOIN dbo.Skill AS...

    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 60 character string every third character with pipes

    Your solutions seem very clever, but I wouldn't test my luck like that when having a varchar(max) column.

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