Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Option to NOT include a column in the output (Read 5639 times)
grahamf
YaBB Newbies
*


I Love SQL*XL

Posts: 13
Option to NOT include a column in the output
21.03.07 at 10:50:27
 
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
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Option to NOT include a column in the output
Reply #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.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
grahamf
YaBB Newbies
*


I Love SQL*XL

Posts: 13
Re: Option to NOT include a column in the output
Reply #2 - 22.03.07 at 13:36:31
 
Quote from Gerrit-Jan Linker on 21.03.07 at 21:19:47:
I understand what you want but I am not 100% sure I understand why.

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.
 
I hope this is clearer
 
Thx
Graham
 
Back to top
 
 
  IP Logged
Pages: 1