Article View: borland.public.cppbuilder.database.ado
Article #2588Re: SQL SELECT -- Combine 2 columns
From: Viatcheslav V. Vassiliev
Date: Sat, 19 Apr 2003 13:29
Date: Sat, 19 Apr 2003 13:29
33 lines
1885 bytes
1885 bytes
This depends on your DBMS. In MS SQL Server use (pubs db):
Select (au_lname + ', ' + au_fname) as [name] from authors
----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.
"Rainer Welzel" <rainer@fgg-welzel.de> �������/�������� � ��������
���������: news:3ea14b69@newsgroups.borland.com...
> Hi ,
> I failed to combine 2 fields with the following statement:
>
> ADOQueryIND->SQL->Add("SELECT Name, City & ', ' & Country AS Location FROM
> tblIndi");
>
> also
>
> ADOQueryIND->SQL->Add("SELECT Name, City || ', ' || Country AS Location
FROM
> tblIndi");
>
> this statement failed.
>
> Have anybody the right syntax ??
>
> thx rainer
>
>
>
Technical Details
Message-ID:
<3ea14f97@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ea14b69@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,2ea9fd8801400070 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-04-19 06:36:13 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3ea14b69@newsgroups.borland.com> Subject: Re: SQL SELECT -- Combine 2 columns Date: Sat, 19 Apr 2003 17:29:35 +0400 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 213.247.201.57 Message-ID: <3ea14f97@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1050759063 213.247.201.57 (19 Apr 2003 06:31:03 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail