PC Review


Reply
Thread Tools Rate Thread

address in one line

 
 
Pat
Guest
Posts: n/a
 
      11th May 2010
Hi all,

I am trying to get query to return record like follow:

name
123 mian st.
houston, tx 77082
USA

but the result i get is as followed:
name
123 main st.
houston
tx
77082
USA
what do i need to chage in the query? the query as followed:


SELECT
vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
& Chr(10) & Chr(13) & vendor.City & " , " & vendor.State & " ' " &
vendor.Zip
& Chr(10) & Chr(13) & vendor.Country

from vendor

 
Reply With Quote
 
 
 
 
KARL DEWEY
Guest
Posts: n/a
 
      11th May 2010
I would say it is not possible you are getting the results you say is from
the query you posted.
Why does your query have a space preceeding the comma like this --
vendor.City & " , " & vendor.State

That comma is not showing in the results you posted. It seems you have
more than one query and are seeing the output from a different one than you
posted.

--
Build a little, test a little.


"Pat" wrote:

> Hi all,
>
> I am trying to get query to return record like follow:
>
> name
> 123 mian st.
> houston, tx 77082
> USA
>
> but the result i get is as followed:
> name
> 123 main st.
> houston
> tx
> 77082
> USA
> what do i need to chage in the query? the query as followed:
>
>
> SELECT
> vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
> & Chr(10) & Chr(13) & vendor.City & " , " & vendor.State & " ' " &
> vendor.Zip
> & Chr(10) & Chr(13) & vendor.Country
>
> from vendor
>

 
Reply With Quote
 
Pat
Guest
Posts: n/a
 
      11th May 2010
sorry the query is as followed:

SELECT
vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
& Chr(10) & Chr(13) & vendor.City & Chr(10) & Chr(13) & vendor.State &
Chr(10) & Chr(13) & vendor.Zip & Chr(10) & Chr(13) & vendor.Country

from vendor

"KARL DEWEY" wrote:

> I would say it is not possible you are getting the results you say is from
> the query you posted.
> Why does your query have a space preceeding the comma like this --
> vendor.City & " , " & vendor.State
>
> That comma is not showing in the results you posted. It seems you have
> more than one query and are seeing the output from a different one than you
> posted.
>
> --
> Build a little, test a little.
>
>
> "Pat" wrote:
>
> > Hi all,
> >
> > I am trying to get query to return record like follow:
> >
> > name
> > 123 mian st.
> > houston, tx 77082
> > USA
> >
> > but the result i get is as followed:
> > name
> > 123 main st.
> > houston
> > tx
> > 77082
> > USA
> > what do i need to chage in the query? the query as followed:
> >
> >
> > SELECT
> > vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
> > & Chr(10) & Chr(13) & vendor.City & " , " & vendor.State & " ' " &
> > vendor.Zip
> > & Chr(10) & Chr(13) & vendor.Country
> >
> > from vendor
> >

 
Reply With Quote
 
KARL DEWEY
Guest
Posts: n/a
 
      11th May 2010
Try this --
SELECT vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
& Chr(10) & Chr(13) & vendor.City & ", " & vendor.State & " " & vendor.Zip &
Chr(10) & Chr(13) & vendor.Country
FROM vendor;

--
Build a little, test a little.


"Pat" wrote:

> sorry the query is as followed:
>
> SELECT
> vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
> & Chr(10) & Chr(13) & vendor.City & Chr(10) & Chr(13) & vendor.State &
> Chr(10) & Chr(13) & vendor.Zip & Chr(10) & Chr(13) & vendor.Country
>
> from vendor
>
> "KARL DEWEY" wrote:
>
> > I would say it is not possible you are getting the results you say is from
> > the query you posted.
> > Why does your query have a space preceeding the comma like this --
> > vendor.City & " , " & vendor.State
> >
> > That comma is not showing in the results you posted. It seems you have
> > more than one query and are seeing the output from a different one than you
> > posted.
> >
> > --
> > Build a little, test a little.
> >
> >
> > "Pat" wrote:
> >
> > > Hi all,
> > >
> > > I am trying to get query to return record like follow:
> > >
> > > name
> > > 123 mian st.
> > > houston, tx 77082
> > > USA
> > >
> > > but the result i get is as followed:
> > > name
> > > 123 main st.
> > > houston
> > > tx
> > > 77082
> > > USA
> > > what do i need to chage in the query? the query as followed:
> > >
> > >
> > > SELECT
> > > vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
> > > & Chr(10) & Chr(13) & vendor.City & " , " & vendor.State & " ' " &
> > > vendor.Zip
> > > & Chr(10) & Chr(13) & vendor.Country
> > >
> > > from vendor
> > >

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      11th May 2010
On Tue, 11 May 2010 07:24:01 -0700, Pat <(E-Mail Removed)> wrote:

>Hi all,
>
>I am trying to get query to return record like follow:
>
>name
>123 mian st.
>houston, tx 77082
>USA


Chr(13) & Chr(10) is how you insert a newline (carriage return - linefeed)
into a string. If you don't want the newline don't include the Chr() calls:
put in an explicit blank instead.

SELECT
vendor.VENDOR_NAME & Chr(10) & Chr(13) & vendor.Address
& Chr(10) & Chr(13) & vendor.City & " " & vendor.State &
" " & vendor.Zip & Chr(10) & Chr(13) & vendor.Country

--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the address line of the browser the same as the title line? =?Utf-8?B?QmFuam9sYXR1c2Fr?= Windows XP General 0 24th Aug 2007 02:10 AM
Re: mail merge - different line of address on a separate line Suzanne S. Barnhill Microsoft Word Document Management 1 12th Dec 2006 10:32 AM
remove dashed line under address line in word document =?Utf-8?B?anVzdGxlYXJuaW5n?= Microsoft Word Document Management 10 21st Mar 2006 08:56 PM
How to address new mail from proxied address book from To: line =?Utf-8?B?c3R1ZHloYXdr?= Microsoft Outlook Contacts 1 18th Jun 2005 01:04 AM
Re: Contacts to Address Book to Email Address Line Russ Valentine [MVP-Outlook] Microsoft Outlook Contacts 1 25th Aug 2003 09:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:15 AM.