Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)

  • RE: Trigger Help

    The TOP 1 was because INSERTED could technically return multiple rows and you can't assign the values of rows to a single variable.

  • RE: Trigger Help

    ONSA_NSS.datesent = GETDATE()

  • RE: Trigger Help

    Scott has a very good point.  With a scheduled job, you can at least test to see if the job completed and then try again on the next run (using...

  • RE: Trigger Help

    That seems pretty straighforward.  Here's my example tables and the trigger.  I used a bit for the AutoSend field instead of Yes/No but you can adjust for that.

    --Create example tables
    create...
  • RE: WHILE Statement with CURSOR

    Very true.  Cursors will suck the life out of a SQL server.  Here's another angle for a set based operation.

    First, I had to assume that we have (or can add)...

  • RE: windows clipboard

    I believe you need to change the regex by removing the |\s? at the end.  That looks like a blanket search for whitespace. So it would look like:

    '({\\)(.+?)(})|(\\)(.+?)(\b)}'

  • RE: Find missing numbers in sequential column

    I am humbled by your veteran approval.

    I should have caught that one off scenario but I had focused on dealing with a missing...

  • RE: Pocket PC SQL Ce Processing out of memory issues

    My error.  When using merge replication, the entire thing is one big transaction.  RDA on the other hand can be broken into individual transactions.

    What that means is that SQLCE is...

  • RE: windows clipboard

    Sorry, thought you were in SQL 2005.

    I think it can be done with Windows API calls to OpenClipboard (e.g. http://www.mentalis.org/apilist/OpenClipboard.shtml) and then calling SetClipboardData and GetClipboardData with different formats. ...

  • RE: WHILE Statement with CURSOR

    OK, that's a little different than my original answer was trying to do.  Basically, you want to walk your tmp_D_Dates table instead, incrementing this row counter as you go.  Although...

  • RE: WHILE Statement with CURSOR

    So fiscal_day is a counter of the items in that period order by date?  So if the data looked like this, the results would be:

    dtfiscal_dayfiscal_monthfiscal_yearfiscal_month_nm
    1/1/2005

    1

    12005
    1/2/2005212005
    1/15/2005312005
    1/20/2005412005
    1/20/2005512005
    2/1/2005122005

    Assuming the period is defined...

  • RE: WHILE Statement with CURSOR

    Maybe a snippet of sample data would help, I don't quite get the goal.

    You have table mend_period which looks like:

    mep_from_dtmep_end_dt
    1/1/2005

    1/31/2005

    2/1/20052/28/2005

    Then you have table tmp_D_Dates which looks sort of like:

  • RE: Login Problem ??

    Couple ideas:

    Use a try-catch block to catch a failed Connect call.  You should probably set a reasonable LoginTimeout value first.

    I believe you could use SQLInstance.Status to check whether the service...

  • RE: Pocket PC SQL Ce Processing out of memory issues

    No answers here?  I'll add my $.02 and see what's up.

    I don't think it's entirely a matter of processing, on the PocketPC it is all about storage and the amount...

  • RE: ASP code to TSQL code

    Ooph.  OK, it looks like the SQL code is only looking for duplicate brokers (address and DBA (which includes zip code) are similar but not identical).  Then the ASP code...

Viewing 15 posts - 1 through 15 (of 20 total)