I use Definition Queries a lot in my daily GIS life, but one of the many things I've found annoying about ArcMap is the inability to comment out Definition Queries. I'd like to have this option as sometimes I want to turn on/off the Definition Query or I want to have multiple Queries on a single Shapefile, but only one active at a time.
So far to get around this, I usually just have a notepad document in the background and copy and paste as necessary. But the ideal solution would be to use the definition query tab in the layer properties to replace this document. I might have multiple different queries on a layer, but all commented out.
As I understand, Definition Queries are written in SQL. To comment in SQL I believe you either start a line with: -- or encompass a statement in brackets: { }. I've tried both of these:
Original: "DATA_AQUISITION" LIKE 'MISSING XSECTION' Dashes: --"DATA_AQUISITION" LIKE 'MISSING XSECTION' Brackets: {"DATA_AQUISITION" LIKE 'MISSING XSECTION'} The last two statements return a SQL expression error and won't draw in ArcMap. I'm not looking for a programming solution, as that would just be too much work.
Any help would be appreciated, thanks!
أكثر...
So far to get around this, I usually just have a notepad document in the background and copy and paste as necessary. But the ideal solution would be to use the definition query tab in the layer properties to replace this document. I might have multiple different queries on a layer, but all commented out.
As I understand, Definition Queries are written in SQL. To comment in SQL I believe you either start a line with: -- or encompass a statement in brackets: { }. I've tried both of these:
Original: "DATA_AQUISITION" LIKE 'MISSING XSECTION' Dashes: --"DATA_AQUISITION" LIKE 'MISSING XSECTION' Brackets: {"DATA_AQUISITION" LIKE 'MISSING XSECTION'} The last two statements return a SQL expression error and won't draw in ArcMap. I'm not looking for a programming solution, as that would just be too much work.
Any help would be appreciated, thanks!
أكثر...