Forum Replies Created

Viewing 15 posts - 1,921 through 1,935 (of 13,874 total)

  • Reply To: How delete database Restricted User, delete error

    What is the error message you receive?


  • Reply To: YTD Date calculation

    Jeffrey Williams wrote:

    I assume you replace any functions where CASE can be used - or is it only IIF that you don't use?

    Like a COALESCE with 10 arguments, for example. Why...


  • Reply To: YTD Date calculation

    CLR functions for performing Regular Expression searches aren't SQL either, but they're useful. Where do you draw the line?

    IIF is part of T-SQL and is more succinct than CASE, and...


  • Reply To: Performance tuning

    sqlfriend wrote:

    Yes, I did analyze the execution log, the slowess happened on each route processed for each stop location.

    That sounds like your entire process.

    Doesn't your SSIS package contain multiple steps?...

    • This reply was modified 4 years, 10 months ago by Phil Parkin. Reason: Fix typo

  • Reply To: YTD Date calculation

    Jeffrey Williams wrote:

    If you look at the original post, he checks for month less than 4.

    Indeed, but there is no ELSE in there, so we have to make assumptions about what...


  • Reply To: Performance tuning

    sqlfriend wrote:

    all this web service is to process each route one by one for stops and students, and street corners. After one route, process another one. It repeats same process...


  • Reply To: YTD Date calculation

    Would agree - except the solution doesn't work for dates where month is greater than 4

    I read the requirement several times and ended up shrugging my shoulders and sending in...


  • Reply To: Performance tuning

    Have you analysed execution logs to determine where the slowness occurs?


  • Reply To: How to get the detailed record and summary value at the same time

    If you are hoping for a coded solution, please take the time to provide your sample data in a form which we can paste into SSMS and execute.


  • Reply To: Cursor replacement suggestions

    Bruin wrote:

    If I was going to try a re-write, do you have any suggestions?

    THx.

    Frederico provided some.


  • Reply To: YTD Date calculation

    ktflash wrote:

    String Concat missing, ur trying to concat a string and an integer

    DECLARE @frdate date = '01-01-2021'DECLARE 
    @ytdfrDate date
    if Month(@frDate) < 4begin
    SET @ytdfrDate = '01/04/' + cast(dateadd(y,-1,@frdate)...

  • Reply To: YTD Sale

    Can you provide some consumable data, please? That is, some CREATE TABLE and INSERT statements which we can paste into SSMS and execute?

    Also, please explain the link between Invoice and...


  • Reply To: Cursor replacement suggestions

    Bruin wrote:

    Thanks for the assessment ... any thoughts of how to detangle the RBAR.

    I don't think that we are in a position to take you much further with this task....


  • Reply To: Query

    It would help if you would provide consumable data next time (check my code to see how this is done).

    DROP TABLE IF EXISTS #SomeTab;

    CREATE TABLE #SomeTab
    (
    ...

    • This reply was modified 4 years, 10 months ago by Phil Parkin. Reason: Slight code improvement

  • Reply To: Create a delta from downloaded info

    You seem to be having trouble understanding what is being requested.

    What Jeff is talking about is that you provide us with some sample code which we can cut and paste...


Viewing 15 posts - 1,921 through 1,935 (of 13,874 total)