Forum Replies Created

Viewing 15 posts - 4,441 through 4,455 (of 5,103 total)

  • RE: DELETE all rows exept the last five

    I am assuming that when you said  "last five" you are using the date field for that and also that LogId is PK, so:

    DELETE FROM TBL

    JOIN

    (

    Select a.LogID

    From

    (SELECT LogID, (SELECT COUNT(*)...

  • RE: Can this be done without cursors?

    In my opinion if you are going to do this server side you will be better of using one cursor than any other technique.

    Steps would be:

    1 create a temp table...

  • RE: sp_sdidebug extended stored procedure

    If by any chance somebody applied sp3 or later to your server then you should re enable the exec permisions  on the procedure. for more info read this article:

    http://www.dbazine.com/cook1.shtml

  • RE: Querying a text file via linked server passing file name to procedure

    Declare @stm varchar(4000), @tableName varchar(255)

    Set @tableName = 'TA_200.TXT'

    Set @stm = 'select TextFile.* ' +

    'INTO REGULAR_TABLE ' +

    'FROM TextFileServer...['+@tableName+'] as TextFile ' +

    ' left outer join Imports_TA ' +

    ' on TextFile.SSN=Imports_TA.SSN' +

    '  and TextFile.Date_Assess...

  • RE: SQL Server Reserved memory TaskManager Usage?

    Steve,

    The actual value is 6114GB reserved for SQL Server the OS gets the rest (1GB to manage awe which BTW is On, plus what is left). Now the scenario precicely...

  • RE: How to get return from Stored Procedure

    It's late Friday and as always I am in a hurry but you should try this:

     

    SET @strSQL =  'SELECT @mKey = CASE WHEN Max(' + @mTableName + '.' +...

  • RE: Need Help with T-SQL

    It's a little late and I have to go home so I can't try this but I would solve that with something lke:

    Select TK, Stat Max(Dte) - Min(Dte) as [Time...

  • RE: Table image to disk file

    That is a front end task and can be accomplished in may, many, many, ... did I said many? ...  ways

    To give you a stratrting point just check This article and replace...

  • RE: Set and Remove Identity attribute

    Just Keep in mind That SET IDENTITY INSERT can only be use on 1 table at a time in the database

    and Yes you can execute it from vb too just make...

  • RE: compute clause

    Tell you what...  it's a very bad habit that I have to not check BOL sometimes. I remenber when in our shop it was decided not to use compute by...

  • RE: How to Abort Entire QA Script?

    I this case I would divide the script into several Files One per batch and handle that with a front end tool so that...

  • RE: compute clause

    I am really sorry to be the carrier of bad news but the compute by clause produces NON RELATIONAL Results therefore forget about ADO

  • RE: concurrency

    The "update flag" method described above works with limited table sizes

    the bigger the table the higher the contention, the slower the process and...

  • RE: Open Transactions Locking Database

    those locking issues are very common on cases where "select into" is used with long performing queries. My advice: Try to change those to INSERT INTO instead

     

    HTH

     

  • RE: Storing a Hierarchy

    This is a typical problem modeled for geographic systems where multiple parents are allowed :

    Here is an example to get you started

     

Viewing 15 posts - 4,441 through 4,455 (of 5,103 total)