Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to add a blank column to a query for CSV export.

207 views
Skip to first unread message

Alan Carpenter

unread,
Aug 14, 2022, 9:44:38 AM8/14/22
to
How to add a blank column to a query for CSV export.

I need to transfer contacts between two old phones, for a friend. I can
export and import CSV from each, but each uses a different layout so I'll
need to tweek.
For example, the field "Title" (for Mr, Mrs, Miss etc) is in the new but
not in the old. This means I'll need to create a blank, empty column
named "Title."

All clear, all easy, should be trivial BUT I cannot remember how to
create the new empty column without Access treating it as a parameter.
(Yes, I'm old.)

Here's a bit of basic SQL as an example.

SELECT GeorgeContacts.[First Name], GeorgeContacts.[Last Name],
GeorgeContacts.[Mobile Phone]
FROM GeorgeContacts;

This gives three columns First Name, Last Name and Mobile Phone.

How do I get the result Title, First Name, Last Name and Mobile Phone?

For what it's worth, here's the format of the full list of headers for
old and new. Sorry if word-wrap causes a problem.

Old: Name,Given Name,Additional Name,Family Name,Yomi Name,Given Name
Yomi,Additional Name Yomi,Family Name Yomi,Name Prefix,Name
Suffix,Initials,Nickname,Short Name,Maiden
Name,Birthday,Gender,Location,Billing Information,Directory
Server,Mileage,Occupation,Hobby,Sensitivity,Priority,Subject,Notes,Langua
ge,Photo,Group Membership,E-mail 1 - Type,E-mail 1 - Value,Phone 1 -
Type,Phone 1 - Value,Phone 2 - Type,Phone 2 - Value,Address 1 -
Type,Address 1 - Formatted,Address 1 - Street,Address 1 - City,Address 1
- PO Box,Address 1 - Region,Address 1 - Postal Code,Address 1 -
Country,Address 1 - Extended Address

New: "Title";"First name";"Middle name";"Last name";"Suffix";"Job
title";"Company";"Birthday";"SIP address";"Push-to-talk";"Share
view";"User ID";"Notes";"General mobile";"General phone";"General e-
mail";"General fax";"General video call";"General web address";"General
VOIP address";"General P.O.Box";"General extension";"General
street";"General postal/ZIP code";"General city";"General
state/province";"General country/region";"Home mobile";"Home phone";"Home
e-mail";"Home fax";"Home video call";"Home web address";"Home VOIP
address";"Home P.O.Box";"Home extension";"Home street";"Home postal/ZIP
code";"Home city";"Home state/province";"Home country/region";"Business
mobile";"Business phone";"Business e-mail";"Business fax";"Business video
call";"Business web address";"Business VOIP address";"Business
P.O.Box";"Business extension";"Business street";"Business postal/ZIP
code";"Business city";"Business state/province";"Business
country/region";""

I could type them all in, of course, but there's nearly 500 and I'm lazy
(and old.)

All help gratefully received.

Ron Weiner

unread,
Aug 14, 2022, 10:31:31 AM8/14/22
to
on 8/14/2022, Alan Carpenter supposed :
> SELECT GeorgeContacts.[First Name], GeorgeContacts.[Last Name],
> GeorgeContacts.[Mobile Phone]
> FROM GeorgeContacts;

Try

SELECT "" as Title, GeorgeContacts.[First Name], GeorgeContacts.[Last
Name],GeorgeContacts.[Mobile Phone]
FROM GeorgeContacts;

Rdub

Alan Carpenter

unread,
Aug 14, 2022, 5:33:34 PM8/14/22
to
Ron Weiner <r...@domain.com> wrote in news:tdb0vv$35u42$1...@dont-email.me:

> SELECT "" as Title, GeorgeContacts.[First Name], GeorgeContacts.[Last
> Name],GeorgeContacts.[Mobile Phone]
> FROM GeorgeContacts;
>

... which of course is exactly what I wanted.

I would swear on a stack of database manuals I tried that more than once.
Oh well, I hope I like it in the Senile Care home I seem to be heading for.

Thanks for that. Take the rest of the day off.
0 new messages