Forum Replies Created

Viewing 15 posts - 151 through 165 (of 294 total)

  • RE: Trigger question

    Correct, I'm well aware of the problem with @@identity, in fact I was 'stung' by it at the last place.  Andy is right, the Scope_Identity is better, as Ident_current('tbl')...

  • RE: Trigger question

    /*

    Excellent.  I tried to go back to the source tables as they always contain the 

    latest record, but that goes against the grain of what we are trying to do.  

    Your sugestion is spot on, and once again I learn something new. 

    I followed BOLs advice and used the rowversion synonym, which until now I'd never heard of.

    Cheers!

    Dave J

    */

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

    --table definition

    IF OBJECT_ID('Tick_info_history') > 0

      DROP TABLE TICK_INFO_HISTORY

    GO

    CREATE TABLE TICK_INFO_HISTORY (

      TICKET_TXN_ID      INT  NOT NULL,...

  • RE: question mark in the WHERE clause.

    I don't know ADO but I'd bet its a place holder. Look at this line

    adoParameter.Value = vWhereValues.Items(queryParameterCount - 1)

    That sets the value of the ? with whatever vWhereValues.Items(queryParameterCount -...

  • RE: question mark in the WHERE clause.

    Is this from a DTS Package?  If so, it's a place holder for a parameter.

    HTH

    Dave J

  • RE: Changing result set

    I seem to post this a lot

    Look at this thread, I had a very similar problem, which was soon worked out.

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=242919

    HTH

    Dave J

  • RE: just the date, please

    I don't doubt it, but I did use a smiley

    Dave J

  • RE: just the date, please

    The way I do it is

    select Left(GetDate(),11)

    simply because it's less typing

    Dave J

  • RE: T-SQL Recursion in SQL 2000

    Good catch Jeff.

    Sorry Shane, I should have said "look *in* Books Online"

    Dave J

  • RE: T-SQL Recursion in SQL 2000

    Look at the topic "expanding hierarchies" on Books on Line.  I have adapted this to my particular problem myself and it works well.

    HTH

    Dave J

     

  • RE: Round to Even (aka Banker''''s Rounding) - The final function

    Hello Sergiy

    As for me there is nothing good in not having education essential for the job.

    ...

    I hope you not gonna let this situation stay for long. Best luck to you...

  • RE: Independence Day

    US Ascent training?  Do you mean US Accent training?  And if you do, that's bizzare!

    Happy Independance day you backstabbers.

  • RE: Tracking Stored Procedures

    Personally I would (and do) use profiler, and save the results to a table which I could (and can) query later.

    HTH...

  • RE: Cross tab SQL.

    Oops!

    Yours is an excellent method. I looked at the results and thought "That's odd." But you're Spot on. ...

  • RE: Cross tab SQL.

    Peter, shouldn't your derived table look like this?

    SELECT MONTH(DataDate) AS theDate, 'Total' AS theCategory, TotalCount AS theValue FROM @MyTable UNION ALL

    SELECT MONTH(DataDate), 'Count10s', Count10s FROM @MyTable UNION ALL

    SELECT MONTH(DataDate), 'Count20s',...

  • RE: Random Record Selection

    "As a matter of fact, if anyone has been required to produce random rows, I wouldn't mind hearing from you, either."

    I once wrote a query to return 20 Random telephone...

Viewing 15 posts - 151 through 165 (of 294 total)