Forum Replies Created

Viewing 15 posts - 1,366 through 1,380 (of 1,424 total)

  • Reply To: 2 STORED PROCEDURE DONT WORKING

    There are a bunch of issues with the code you've posted.  Have a look at this code (I don't have 2008 so please un-d.i.e the objects).  The 2 procs are...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: 2 STORED PROCEDURE DONT WORKING

    Does the REG.MENU table have a primary key?  If so wouldn't you want to output that from the procedure as well?

     

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: sp_executesql with multiple parameters

    There are only 4 input scenarios?  If so it's just as easy to not use dynamic sql.  This proc allows null inputs and filters in 4 ways (including no filter):

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: A DateRange Table Valued function

    Have a look at this code:

    declare
    @start_dtdate,
    @frequencyint,
    @end_dtdate;

    select
    @start_dt='2019-09-01',
    @frequency=14;

    /* the end_dt is always set to the last day of the...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: A DateRange Table Valued function

    Jonathan AC Roberts wrote:

    Steve Collins wrote:

    "WHERE crc.[value] < parms.end_dt" was not necessary at all so I deleted it.  Your function obviated that necessity.  I wrote that but then I pasted it in with...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Export to CSV

    What have you tried?  As I recall SSMS export will not properly escape the text.  I'm pretty sure tho SSIS csv export does.

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: A DateRange Table Valued function

    Your proc produced the correct output.  I'm still trying to get my head around cross apply.  It's kind of magical.  The last part, where not exists, I was really sure...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: A DateRange Table Valued function

    Danke schön!  Nicely done -- it's in my toolbox now.

    We have a project coming up where I'll have the chance to alter or replace the following proc (which runs in...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Trimming then adding text

    IIF(Mid(Fields!my.Value, 30, 1)="(","London", "Paris")

    or (because the position counts counted the brackets):

    IIF(Mid(Fields!my.Value, 28, 1)="(","London", "Paris")

     

     

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Trimming then adding text

    Just to be clear there are 3 possible patterns?

    1. Working Reference : [123456] (text in brackets) -  loads more text
    2. Working Reference : [123456789] (text in brackets) -  loads more text
    3. Working...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Trimming then adding text

    If this can't be done by absolute offset then that raises a bunch of issues.  What can you say about the characters that appear in the 'xxxxxxx xxxxxxx' segments?  Can...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Trimming then adding text

    In this string the dash appears in the 33rd (or 32 starting from 0) position:

    xxxxxxx xxxxxxxxx : 123456 (xx) - xxxxxxx...

    In this string the dash appears in the 36th position:

    xxxxxxx...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Trimming then adding text

    Why not just look for the dash, "-"?

    IIF(InStr(Fields!my.Value,"-")=36, "Paris", "London")

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Is It Worth Writing Unit Tests?

    ZZartin wrote:

    Why pick the first thing he said?  I chose the last thing!  He had pretty much the same conversation we're having and already made the distinction between testing to...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: using variables in for openrowset bulk update

    The code you posted has two lines that say: "fetch next from dbcursor into @zipname,@imageid" within the cursor loop.  Please try with only one fetch (at the end of the...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

Viewing 15 posts - 1,366 through 1,380 (of 1,424 total)