From VBA I want to return the dynaset, and yet I don't wish to display some fields (e.g. an artificially generated primary key), however I still need that information in order to to do other things. It would be nice to exttend your select <column> as comment idea to add the "select <column> as null", column option which would suppress this column from being displayed in the destination worksheet (or Word doc etc) - but it would still be available to the VBA programmer as a returned field.

Just an idea for a future enhancement.... unless this feature is already in SQL*XL and I haven't found it yet Thx Graham

Re: Option to NOT include a column in the outputReply #1 - 21.03.07 at 21:19:47

Hi Graham,

I understand what you want but I am not 100% sure I understand why. Perhaps I can mention a few alternatives to see whether that would help.

You can execute the query when setting the output target to none. That will just give you the recordset and no attempt is made to dump the results anywhere. That will give you a recordset to navigate through. You can use another recordset to dump the results somewhere.

Example: I want to dump a table into a workbook. The table contains a field which indicates important information, but not useful to the end user (e.g. artificial primary key field (id) on a table, or an encoded field which should not be edited directly) Now I could just not select this column in the select statement, however it then wouldn't appear in the recordset. If I need that information in order to process other stuff (e.g. make specific excel cells in the row editable or not) then i would like to retain the data integrity of the whole row.

My current workaround is to run the display query, then immediately run the same query appending the new fields I need (but setting the output to litNone). The problem with this approach is (a) it requires 2 queries (slowdown) and (b) that it is possible (just) that what is displayed from the 1st query will not be the same as retrieved from the 2nd query - as the database is multi-user. The other approach is to just use the 2nd extended query and write my own display functionality. (but why duplicate SQL*XL functionality and introduce my own bugs!)

My suggestion is to allow some columns to NOT be displayed (<column> as null) then data integrity can be improved - and only 1 query is needed rather than 2.

Copyright (C) 1995-2007 Linker IT
Software BV. All Rights Reserved. Oracle is a registered trademark of
Oracle corporation. Excel and Office are registered trademarks of
Microsoft corporation. Other names appearing on the site may be trademarks
of their respective owners. Software,
files, documents, articles and other material are provided
"as is" and without warranties as to performance or mechantability or
any other warranties whether expressed or implied. No
warranty of fitness for a particular purpose is offered.
sitemap