Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / September 2006

Tip: Looking for answers? Try searching our database.

Place Holder in a Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
T Miller - 29 Sep 2006 18:59 GMT
What do you put in the field when you want to create a place holder for a
column, so that if you export to an excel file it only adds the columns you
need from the query?
Signature

Thomas

geebee - 29 Sep 2006 19:03 GMT
hi,

You can add a column to the query retrieving all results from the table you
want to export to Excel, and put any value you wish into rows for this new
column.  The rows only with a specific value or range of values would be
exported.

Hope this helps.

> What do you put in the field when you want to create a place holder for a
> column, so that if you export to an excel file it only adds the columns you
> need from the query?
T Miller - 29 Sep 2006 19:10 GMT
Hi,

But I am thinking I don't want the header to show in the excel file, that
column is blank and already has it's own header.  So, I thought the
placeholder i.e. the "new column" had to have an expression or something so
that it would not overwrite the column in the spreadsheet?
Signature

Thomas

> hi,
>
[quoted text clipped - 8 lines]
> > column, so that if you export to an excel file it only adds the columns you
> > need from the query?
geebee - 29 Sep 2006 19:31 GMT
Hi,

Umm..you don't have to export the new column...  For example,

SELECT test.city, test.num
FROM test
WHERE (((test.num3) Is Not Null))
GROUP BY test.city, test.num;

In this query, columns [city] and [num] are retrieved by the query (and
possibly exported to excel).  Note that there is a where clause for the
[num3] column, which determines which records to select/export.  Since [num3]
is only in the WHERE clause, it will factor into the results but not
retrieved/visible/exported.

Hope this helps,
geebee

> Hi,
>
[quoted text clipped - 15 lines]
> > > column, so that if you export to an excel file it only adds the columns you
> > > need from the query?
KARL DEWEY - 29 Sep 2006 20:15 GMT
Add to the SELECT satatement like this --
SELECT test.city, test.num, "XX" as [My New Column1], 0 as [My New Column2],
Null as [My New Column3]

> Hi,
>
[quoted text clipped - 33 lines]
> > > > column, so that if you export to an excel file it only adds the columns you
> > > > need from the query?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.