🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1058

Re: multiple sql statement using TADOQuery

#1058
From: Viatcheslav V. Vassiliev
Date: Thu, 11 Nov 2004 22:03
39 lines
2302 bytes
Access SQL supports some VBScript functions, so query like this may work:

select Iif(DisplayStatus > 4, conc*2, 0) as conc from mytable

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"siraj" <siraj.sm@omnisens.ch> �������/�������� � �������� ���������:
news:419367c2@newsgroups.borland.com...
> Hi!
> I am using c++ builder 5 and access 2000. I connect using ADO components.
> I have a TDBChart and the datasource of the Series on the chart is
> TADOQuery.
> Using the ADOQuery, I query a table in access 2000. The recordset should
be
> modified depending on the value of one of the field in the table.
> For example,
> In my table,  I have name,timestamp,conc,DisplayStatus.
> If DisplayStatus>4 then
> conc=conc*2;
> else
> conc=0
>
> How can i make the ADOQuery return the resultset depending on the above
> rule.
>
> It is something like a batch sql statement.
>
> How can I do this? Any code samples?
>
> Regards
> Siraj
>
>
Technical Details
Message-ID: <4193e1c1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!in.100proofnews.com!in.100proofnews.com!nntpfeed.zonnet.nl!news.cambrium.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <419367c2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,33c67b2d6bc6ce6
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <419367c2@newsgroups.borland.com>
Subject: Re: multiple sql statement using TADOQuery
Date: Fri, 12 Nov 2004 01:03:38 +0300
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 213.234.218.42
Message-ID: <4193e1c1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1100210625 213.234.218.42 (11 Nov 2004 14:03:45 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!in.100proofnews.com!in.100proofnews.com!nntpfeed.zonnet.nl!news.cambrium.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail