Forum Replies Created

Viewing 15 posts - 16 through 30 (of 148 total)

  • RE: Tricky SQL Query

    Updated my first (original) post - Posted Yesterday @ 5:49 AM.

    You can ignore all other posts relating to Tricky SQL Query.

  • RE: Tricky SQL Query

    Hi Serg-52

    Based on [dbo].[AAA_Mytable], you get the following:

    TermCalendarIDRegYearStudentUID Qual Rollover

    2 2011 ...

  • RE: Assigning multiple rows to a single variable parameter

    Hi Luis, updated the original script. Can you assist ?

  • RE: Tricky SQL Query

    Hi Serg-52, thanks for posting the code. Have not tried it yet, will do tomorrow morning.

    The stored procedure requires input for multiple students (i.e. @Student), and the example I...

  • RE: Assigning multiple rows to a single variable parameter

    Hi Luis, added data script to my post.

  • RE: resolve sql issue by not using cursor or while loop

    Hi Michael.

    Based on Jeff's reply, I no longer do the following:

    UPDATE #Part1

    SET @PaymentDueDate = PaymentDueDate WHERE ID = 1

    ----------------------------------

    I derive ID from:

    Create table #Part1

    (

    ID ...

  • RE: resolve sql issue by not using cursor or while loop

    --Step 2:

    Insert into #Part2

    Select Distinct

    StudentUID,

    PaymentDueDate,[Description],MinAmountDue,

    (SELECT Years FROM dbo.ADV_rptage(PaymentDueDate,@AgingDate)) AS Years,

    (SELECT Months FROM dbo.ADV_rptage(PaymentDueDate,@AgingDate)) AS Months,

    (SELECT [Days] FROM dbo.ADV_rptage(PaymentDueDate,@AgingDate)) AS [Days],

    DATEDIFF(MONTH,PaymentDueDate,@AgingDate) AS MonthDuration

    -- ...

  • RE: Activation Stored Proc with Parameters

    Hi Barry, will give it a try - thanks for the effort.

  • RE: Asynchronous SP execution via Service Broker

    Hi Nils, Hope you can assist.

    Want to move data asap from ServerA to ServerB when user clicks on 'Submit button' in Application front-end of ServerA. Once ServerB receives the data,...

  • RE: Need to un-pivot some columns, pivot one column

    sivaj2k , Mitesh Oswal , David Burrows - thank you for your replies, will test them later today and reply to this post with my findings.

    -----------------------------------------

    Below is a much...

  • RE: RecursiveHierarchyCTE

    I compared the functions DelimitedSplitN4K and SplitList for accuracy and speed:

    Found that if you are calling the function Split in the where clause of many of your cte's as

    I...

  • RE: RecursiveHierarchyCTE

    Thanks Lynn, I read the article.

    Just for the fun of it I will compare all 4 functions for accuracy and speed:

    DelimitedSplitN4K, DelimitedSplit8K, SplitList, fn_CSVToTableString.

    Judging by the article, I...

  • RE: RecursiveHierarchyCTE

    Hi Lynn, I will compare your function with the one below and the function 'fn_CSVToTableString', notify you 2moro which I find is the best.

    -----------------------------------------------

    CREATE FUNCTION [dbo].[SplitList]

    (

    @RowData nvarchar(Max)='',

    @SplitOn nvarchar(5)=''

    )

    RETURNS @RtnValue table

    (

    Id...

  • RE: RecursiveHierarchyCTE

    Hi Lynne, a special thanks - you're a star.

    --------------------------------------------------------

    I noted the changes you made relating ad_SequenceId with ( --- replaced with above ).

    Found that replacing the BaseData...

  • RE: RecursiveHierarchyCTE

    Hi Jeff / Lynn, I updated the query I posted.

    Added '1_Script.txt' , collation is 'SQL_Latin1_General_CP1_CI_AS'.

    Added function to cater for multiple SRID's via the parameter ( @SRID nvarchar(max)...

Viewing 15 posts - 16 through 30 (of 148 total)