Double Quote in Access Query result Causes two double Quote When You copy and Paste.

mamin123

New Member
Joined
Jun 10, 2008
Messages
12
Hi
I Have access query result where i see expected result in MS access itself but when I copy and paste same result, I see extra double quote in result. how do I fix this issue ? Please see attached.

This is how I see query result in my MS Access query result


Catalog_Table_View
Statement
catalog sql object "_SYS_AFL"."EML_MODEL_CONFIGURATION": DELETE;
catalog sql object "_SYS_AFL"."EML_MODEL_CONFIGURATION": INSERT;
catalog sql object "_SYS_AFL"."EML_MODEL_CONFIGURATION": SELECT;
catalog sql object "_SYS_AFL"."EML_MODEL_CONFIGURATION": UPDATE;
catalog sql object "_SYS_AFL"."FUNCTION_EXECUTION_COUNTS_CONTROL": DELETE;
catalog sql object "_SYS_AFL"."FUNCTION_EXECUTION_COUNTS_CONTROL": INSERT;
catalog sql object "_SYS_AFL"."FUNCTION_EXECUTION_COUNTS_CONTROL": SELECT;
catalog sql object "_SYS_AFL"."FUNCTION_EXECUTION_COUNTS_CONTROL": UPDATE;
catalog sql object "_SYS_AFL"."PLUGIN_ERRORS": DELETE;
catalog sql object "_SYS_AFL"."PLUGIN_ERRORS": INSERT;
catalog sql object "_SYS_AFL"."PLUGIN_ERRORS": SELECT;
catalog sql object "_SYS_AFL"."PLUGIN_ERRORS": UPDATE;
catalog sql object "_SYS_TASK"."CURRENT_VERSIONS_": SELECT;
catalog sql object "_SYS_XB"."MESSAGING_DESTINATIONS": SELECT;
catalog sql object "_SYS_XB"."MESSAGING_SUBSCRIPTIONS": SELECT;
catalog sql object "SYS"."EXPLAIN_PLAN_TABLE": DELETE;

<tbody>
</tbody>


When I copy and paste same result into any Text Editor (eg. Notepad), I see one extra double quote than I should be.

Example Query giving this result:
SELECT Unique_Privileges.*, "catalog sql object """ & Trim([SCHEMA_NAME]) & """.""" & Trim([OBJECT_NAME]) & """: " & Trim([PRIVILEGE]) & ";" AS Statement
FROM Unique_Privileges WHERE (((Unique_Privileges.OBJECT_TYPE)="TABLE" Or (Unique_Privileges.OBJECT_TYPE)="VIEW"));


"catalog sql object ""_SYS_AFL"".""EML_MODEL_CONFIGURATION"": DELETE;"
"catalog sql object ""_SYS_AFL"".""EML_MODEL_CONFIGURATION"": INSERT;"
"catalog sql object ""_SYS_AFL"".""EML_MODEL_CONFIGURATION"": SELECT;"
"catalog sql object ""_SYS_AFL"".""EML_MODEL_CONFIGURATION"": UPDATE;"
"catalog sql object ""_SYS_AFL"".""FUNCTION_EXECUTION_COUNTS_CONTROL"": DELETE;"
"catalog sql object ""_SYS_AFL"".""FUNCTION_EXECUTION_COUNTS_CONTROL"": INSERT;"
"catalog sql object ""_SYS_AFL"".""FUNCTION_EXECUTION_COUNTS_CONTROL"": SELECT;"
"catalog sql object ""_SYS_AFL"".""FUNCTION_EXECUTION_COUNTS_CONTROL"": UPDATE;"
"catalog sql object ""_SYS_AFL"".""PLUGIN_ERRORS"": DELETE;"
"catalog sql object ""_SYS_AFL"".""PLUGIN_ERRORS"": INSERT;"
"catalog sql object ""_SYS_AFL"".""PLUGIN_ERRORS"": SELECT;"
"catalog sql object ""_SYS_AFL"".""PLUGIN_ERRORS"": UPDATE;"
"catalog sql object ""_SYS_TASK"".""CURRENT_VERSIONS_"": SELECT;"
"catalog sql object ""_SYS_XB"".""MESSAGING_DESTINATIONS"": SELECT;"
"catalog sql object ""_SYS_XB"".""MESSAGING_SUBSCRIPTIONS"": SELECT;"
"catalog sql object ""SYS"".""EXPLAIN_PLAN_TABLE"": DELETE;"
"catalog sql object ""SYS"".""EXPLAIN_PLAN_TABLE"": SELECT;"
"catalog sql object ""SYS"".""FULL_SYSTEM_INFO_DUMPS"": SELECT;"
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
This query has extra quotes being provided in the query itself:
Example Query giving this result:
SELECT Unique_Privileges.*, "catalog sql object """ & Trim([SCHEMA_NAME]) & """.""" & Trim([OBJECT_NAME]) & """: " & Trim([PRIVILEGE]) & ";" AS Statement
FROM Unique_Privileges WHERE (((Unique_Privileges.OBJECT_TYPE)="TABLE" Or (Unique_Privileges.OBJECT_TYPE)="VIEW"));
 
Last edited:
Upvote 0
This query has extra quotes being provided in the query itself:
Example Query giving this result:
SELECT Unique_Privileges.*, "catalog sql object """ & Trim([SCHEMA_NAME]) & """.""" & Trim([OBJECT_NAME]) & """: " & Trim([PRIVILEGE]) & ";" AS Statement
FROM Unique_Privileges WHERE (((Unique_Privileges.OBJECT_TYPE)="TABLE" Or (Unique_Privileges.OBJECT_TYPE)="VIEW"));

Is there anyway I can avoid this situation ? May be write query differently ?
 
Upvote 0
You could try removing the duplicate quotes in the query:
Code:
SELECT Unique_Privileges.*, "catalog sql object "  & Trim([SCHEMA_NAME]) & "." & Trim([OBJECT_NAME]) & ": " & Trim([PRIVILEGE]) & ";" AS Statement
FROM Unique_Privileges WHERE (((Unique_Privileges.OBJECT_TYPE)="TABLE" Or (Unique_Privileges.OBJECT_TYPE)="VIEW"));
 
Upvote 0

Forum statistics

Threads
1,223,565
Messages
6,173,071
Members
452,500
Latest member
FrankSit

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top