Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics RMS (Archived)

I Need query to Delete all Transacction except last month.

Posted on by Microsoft Employee

I Need to Delete all Transacction except last month.  What Query use in RMS? thanks

*This post is locked for comments

  • TheNeos Profile Picture
    TheNeos 1,335 on at
    RE: I Need query to Delete all Transacction except last month.

    The articles don't seem to be available to the community.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: I Need query to Delete all Transacction except last month.

    Hello Jorge,

    Thank you for your question.

    We have two Knowledge Base articles explaining how to do this, depending if you are trying to do so at HQ or at a store.

    You can access these articles at the following links:

    HQ - mbs.microsoft.com/.../KBDisplay.aspx;en-US;860607

    SO - mbs.microsoft.com/.../KBDisplay.aspx;en-US;872372

    Thank you,

    Scott Wardzinski

    Microsoft Dynamics RMS & POS Support Engineer

  • Suggested answer
    Antonijo Todorovik Profile Picture
    Antonijo Todorovik 4,025 on at
    RE: I Need query to Delete all Transacction except last month.

    Hola Jorge.

    Aunque la respuesta de S_Market es correcta, tienes que tener en cuenta que cuando RMS  guarda la información de las transacciones, no toca solo estas dos tablas: TRANSACTION y TRANSACTIONENTRY. Hay varias tablas más que guardan información sobre las ventas, formas de pago y las cantidades de las valutas que se utilizan, no-transacciones (CashDrop, Payout), etc., etc.,...

    Asi que, no se lo que quieres conseguir, pero te recomendaria hablar con tu RMS Partner, por varios razones:

    - esto no es una tarea sencilla, puedes dañar la Base de Datos RMS y perderla

    - es siempre mejor que esto lo hace alguien con más experencia en SQL y RMS, siempre en un entorno de pruebas y con una copia de seguridad de la BBDD previa

    - si el cliente esta bajo BREP, creo que el distribuidor global de licencias Retail Realm tiene un muy buen add-on que se llama Archiving y que lo regala a los clientes con BREP actualizado. Con el add-on puedes "archivar" las transacciones que "no necesitas"...

    Espero que estoy ayudando...

    Saludos, A.

  • Saudi Market Profile Picture
    Saudi Market 875 on at
    RE: I Need query to Delete all Transacction except last month.

    you can use this query (for store db)

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

    DELETE FROM TransactionEntry

    FROM         [Transaction] INNER JOIN

                         TransactionEntry ON [Transaction].TransactionNumber = TransactionEntry.TransactionNumber

    WHERE     ([Transaction].Time < CONVERT(DATETIME, '2015-10-01 00:00:00', 102))

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

    DELETE FROM [Transaction]

    WHERE     (Time < CONVERT(DATETIME, '2015-10-01 00:00:00', 102))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans