A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Inserting blank columns into query



 
 
Thread Tools Display Modes
  #1  
Old June 18th, 2008, 12:00 PM posted to microsoft.public.access.queries
Scott
external usenet poster
 
Posts: 1,119
Default Inserting blank columns into query

Hello,

I am formatting data that will be imported into another softward package so
I need my query to appear in a specific format with five columns.
Specifically, I need my query to have five fields (or columns) but I only
have three columns of data.

I need my query to look as follows:
Field 1: Data
Field 2: Blank
Field 3: Blank
Field 4: Data
Field 5: Data

Question:
How do I insert blank columns into my query? Within design view, I have
inserted blank columns but every time I run my query, Access removes my blank
columns and I end up with three contiguous fields with data.

Thanks for your help.

Scott
  #2  
Old June 18th, 2008, 12:22 PM posted to microsoft.public.access.queries
Bob Barrows [MVP]
external usenet poster
 
Posts: 441
Default Inserting blank columns into query

Scott wrote:
Hello,

I am formatting data that will be imported into another softward
package so I need my query to appear in a specific format with five
columns. Specifically, I need my query to have five fields (or
columns) but I only have three columns of data.

I need my query to look as follows:
Field 1: Data
Field 2: Blank
Field 3: Blank
Field 4: Data
Field 5: Data

Question:
How do I insert blank columns into my query? Within design view, I
have inserted blank columns but every time I run my query, Access
removes my blank columns and I end up with three contiguous fields
with data.

Thanks for your help.

Scott


Select Field1,"" As Field2, ...
or
Select Field1,Null As Field2, ...

Which one you choose depends on te other software package's ability to
handle nulls.


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #3  
Old June 18th, 2008, 12:35 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Inserting blank columns into query

In the query grid (design view).

In the blank column, type NULL into the field "cell" and then check the Show
checkbox for that column.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Bob Barrows [MVP] wrote:
Scott wrote:
Hello,

I am formatting data that will be imported into another softward
package so I need my query to appear in a specific format with five
columns. Specifically, I need my query to have five fields (or
columns) but I only have three columns of data.

I need my query to look as follows:
Field 1: Data
Field 2: Blank
Field 3: Blank
Field 4: Data
Field 5: Data

Question:
How do I insert blank columns into my query? Within design view, I
have inserted blank columns but every time I run my query, Access
removes my blank columns and I end up with three contiguous fields
with data.

Thanks for your help.

Scott


Select Field1,"" As Field2, ...
or
Select Field1,Null As Field2, ...

Which one you choose depends on te other software package's ability to
handle nulls.


  #4  
Old June 18th, 2008, 12:42 PM posted to microsoft.public.access.queries
Bob Barrows [MVP]
external usenet poster
 
Posts: 441
Default Inserting blank columns into query

Oops - I keep forgetting that people might not be familiar with SQL View ...

In the query grid, I would probably do either this:

Field2: ""
or
Field2: Null

and, as John says, click the Show checkbox.

John Spencer wrote:
In the query grid (design view).

In the blank column, type NULL into the field "cell" and then check
the Show checkbox for that column.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Bob Barrows [MVP] wrote:
Scott wrote:
Hello,

I am formatting data that will be imported into another softward
package so I need my query to appear in a specific format with five
columns. Specifically, I need my query to have five fields (or
columns) but I only have three columns of data.

I need my query to look as follows:
Field 1: Data
Field 2: Blank
Field 3: Blank
Field 4: Data
Field 5: Data

Question:
How do I insert blank columns into my query? Within design view, I
have inserted blank columns but every time I run my query, Access
removes my blank columns and I end up with three contiguous fields
with data.

Thanks for your help.

Scott


Select Field1,"" As Field2, ...
or
Select Field1,Null As Field2, ...

Which one you choose depends on te other software package's ability
to handle nulls.


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #5  
Old June 18th, 2008, 01:07 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Inserting blank columns into query

Yeah, it is tough to know what level of experience the poster has. I often
guess wrong, but I attempt to err on the side of lower level of experience,
especially when the poster does not post the SQL statement that they are using
or attempting to use.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Bob Barrows [MVP] wrote:
Oops - I keep forgetting that people might not be familiar with SQL View ...

In the query grid, I would probably do either this:

Field2: ""
or
Field2: Null

and, as John says, click the Show checkbox.

John Spencer wrote:
In the query grid (design view).

In the blank column, type NULL into the field "cell" and then check
the Show checkbox for that column.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Bob Barrows [MVP] wrote:
Scott wrote:
Hello,

I am formatting data that will be imported into another softward
package so I need my query to appear in a specific format with five
columns. Specifically, I need my query to have five fields (or
columns) but I only have three columns of data.

I need my query to look as follows:
Field 1: Data
Field 2: Blank
Field 3: Blank
Field 4: Data
Field 5: Data

Question:
How do I insert blank columns into my query? Within design view, I
have inserted blank columns but every time I run my query, Access
removes my blank columns and I end up with three contiguous fields
with data.

Thanks for your help.

Scott
Select Field1,"" As Field2, ...
or
Select Field1,Null As Field2, ...

Which one you choose depends on te other software package's ability
to handle nulls.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.