SQL backing out rows

  • Overview..

    I am working on an application in Heatlh Home Care which uses Allscripts Home Care.

    Due to billing regulations for Medicaid, bills have to be created to bill Medicare, but not part of the regular Allscripts application.

    A separate database server has been set up to handle this situation with a copy of production (This was suggested as well by Allscripts).

    A Vb.net application has been written to insert rows into a claim table and a claims detail table for particular patients to avoid reentering everything manually, based on their Medicaid bills.

    The application completes successfully, and I see the rows inserted into the tables. I also see the data in the Allscripts appplication.

    But then after some time, they are deleted somehow. Can some one give me a clue as to what or how to figure out why the rows would be backed out of SQL Server.

    Any help is greatly appreciated.

    Thanks,

    Paul

  • how was the copy created the first time around?

    is there a need to keep this copy updated with the data in the first DB? if so what is the method that this uses?

  • The copy was just a backup/restore from production.

    There is no need to keep this copy updated with the production database. The second database is only created to send demand Medicare claim billing from older data in the original production system.

    Paul

    anthony.green (5/8/2012)


    how was the copy created the first time around?

    is there a need to keep this copy updated with the data in the first DB? if so what is the method that this uses?

  • The only way rows are removed from a table is with a delete statement. If you want to track this you could setup a delete trigger on the table(s).

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • might be a long shot but nothing automated restoring the database

    select

    destination_database_name,

    user_name,

    restore_date,

    case restore_type when 'D' then 'Full Restore' when 'L' then 'Log Restore' end as RestoreType

    from

    msdb.dbo.restorehistory

    where

    destination_database_name = 'PutDBNameHere'

    order by

    restore_date desc

    Is it virtual hardware, could something like a VM snapshot be restored, or a database snapshot restored back over the top?

    Only other thing I can suggest is to stick a profile trace or triggers to see what is affecting the table(s) in question

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply