Forum Replies Created

Viewing 15 posts - 196 through 210 (of 3,544 total)

Far away is close at hand in the images of elsewhere.
Anon.

  • Reply To: LTRIM function giving same results as TRIM

    Eirikur Eiriksson wrote:

    Here is a quick example 😎

    USE TEEST;
    GO
    SET NOCOUNT ON;
    DECLARE @TSTR VARCHAR(50) = '.....SSMS.....';
    SELECT
    STUFF(@TSTR,1,PATINDEX('%[^\.]%',@TSTR) - 1,'') AS TRIM_LEFT
    ,LEFT(@TSTR,(1 +...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Reply To: LTRIM function giving same results as TRIM

    If you are talking about a contiguous leading non space character then a combination of PATINDEX and STUFF should work.

    For trailing use REVERSE, PATINDEX and LEFT.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Reply To: Difficulty deciding which job to take

    Jeff Moden wrote:

    The words that strike me here is ...

    I have a good job, but have been offered one from a company i once worked for

    The first step is to sit...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Reply To: How to calculate time difference between two dates portion by attendance

    SELECT[Name],EmployeNo,[Date],[Value],Attendence,
    CASE WHEN PreviousAttendence = 1
    AND Attendence = 1
    AND DATEDIFF(day,PreviousDate,[Date]) = 1
    THEN CAST(PreviousDate as varchar(20)) + ' - ' + CAST([Date] as varchar(20))
    END AS [Calculate Hr's difference]
    FROM(
    SELECTe.[Name],e.EmployeNo,e.[Date],e.[Value],e.Attendence,
    LAG(Attendence,1,0) OVER...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Reply To: Using the OUTPUT CLAUSE in a INSERT statement.

    Thom A wrote:

    As for not using MERGE, it was awful in SQL Server 2008. Since then, it has got better; but there are still some concerns on things. Pretty sure Aaron...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Reply To: Using the OUTPUT CLAUSE in a INSERT statement.

    I don't think you can because only the inserted table is in scope for INSERT.

    Why do you not use MERGE?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: SSRS SUM(IIF()) on a matrix.

    Sorry missed the Sum

    =(Sum(Fields!Booking_Count.Value)/ReportItems!Textbox1.Value)*100

    *Edited my original post as well

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Double Sum in Pivot


    SELECT *, M1+M2, M3+M4, 25 M1Cijena, 25 M2Cijena, 16 M3Cijena, 16 M4Cijena
    FROM ...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Viewing 15 posts - 196 through 210 (of 3,544 total)