Question

Photo of Michael Manning

0

DATAVIEW REMOVE AND OR DELETE

So, I've got some dataviews that I created in Version 7... now we are in Version 9 and I've found out I've got a couple of dataviews that no longer run properly. In fact they don't run at all... they try and then error out.

I've recreated them and they run fine so I'm assuming there was something in the original dataview that is no longer compliant with Version 9. How do I remove the old dataview from the list so no one tries to run it?

  • Photo of Jim Michael

    0

    You will need to use SQL for this (you can run it from Admin | Power Tools | SQL Command).

    If you already know the Id of your DataView, you can enter this code to delete it:

    DELETE FROM DataView
    WHERE Id = 123

    Replace 123 with the Id of the DV you want to delete. You will want to set the "Selection Query?" to NO before running this. If you DON'T know the Id of your DataView, then run this first (with Selection Query set to YES).

    SELECT *
    FROM DataView

    and just look for the name of the DV you're wanting to delete and note its Id, then run the prior delete code.

    BE EXTREMELY CAREFUL that you don't accidentally run the delete SQL *without* a WHERE clause targeting a specific DV Id... if you did so, you would delete ALL of your Dataviews. SQL is like a loaded gun... treat it as such!