Paradox group?

I have a paradox question but I'm not sure where to post it. The question is how do I convert this QBE to a SQL query?



    qbe.Add('ANSWER: TransactionsImport.DB');
    qbe.Add('');
    qbe.Add(':IMSWIN:Transactions.db | TranNumber  |');
    qbe.Add('                        | Check Blank , calc A234567890123456789012345678901234567890 as AcctName |');
    qbe.Add('');
    if GLOBAL_SubAgencyRef then
    begin
      qbe.Add(':IMSWIN:Transactions.db | TranDate | AccountNumber | SubAgencyRef | Debit             | Credit             | Status | ');
      qbe.Add('                        | Check    | Check _join1  | Check        | Calc Sum as Debit | Calc Sum as Credit | HIST   | ');
    end
    else
    begin
      qbe.Add(':IMSWIN:Transactions.db | TranDate | AccountNumber | Debit             | Credit             | Status | ');
      qbe.Add('                        | Check    | Check _join1  | Calc Sum as Debit | Calc Sum as Credit | HIST   | ');
    end;


Does the _join1 signify a GROUP BY clause in SQL so it's totaling the debits and credits per AccountNumber?

select trandate, accountnumber, subagencyref, sum(debit), sum(credit), status
from transactions
where status = 'HIST'
group by accountnumber, trandate, subagencyref, status

Daniel
0
daniel
8/14/2008 3:47:35 PM
embarcadero.delphi.database 1294 articles. 0 followers. Follow

3 Replies
688 Views

Similar Articles

[PageSpeed] 16
Get it on Google Play
Get it on Apple App Store

> {quote:title=daniel sr wrote:}{quote}
> I have a paradox question but I'm not sure where to post it. The question is how do I convert this QBE to a SQL query?
> 
> 
> 
>     qbe.Add('ANSWER: TransactionsImport.DB');
>     qbe.Add('');
>     qbe.Add(':IMSWIN:Transactions.db | TranNumber  |');
>     qbe.Add('                        | Check Blank , calc A234567890123456789012345678901234567890 as AcctName |');
>     qbe.Add('');
>     if GLOBAL_SubAgencyRef then
>     begin
>       qbe.Add(':IMSWIN:Transactions.db | TranDate | AccountNumber | SubAgencyRef | Debit             | Credit             | Status | ');
>       qbe.Add('                        | Check    | Check _join1  | Check        | Calc Sum as Debit | Calc Sum as Credit | HIST   | ');
>     end
>     else
>     begin
>       qbe.Add(':IMSWIN:Transactions.db | TranDate | AccountNumber | Debit             | Credit             | Status | ');
>       qbe.Add('                        | Check    | Check _join1  | Calc Sum as Debit | Calc Sum as Credit | HIST   | ');
>     end;
> 
> 
> Does the _join1 signify a GROUP BY clause in SQL so it's totaling the debits and credits per AccountNumber?
> 
> select trandate, accountnumber, subagencyref, sum(debit), sum(credit), status
> from transactions
> where status = 'HIST'
> group by accountnumber, trandate, subagencyref, status
> 
> Daniel


Sorry, I just found the legacy products area.
0
daniel
8/14/2008 3:53:59 PM
If you have a question about Paradox for Windows then it is not a
CodeGear product and there is no support forum here. Try posting at
www.thedbcommunity.com. If you have a question about using Paradox
tables and the BDE in a Delphi or C++ Builder application post to the
bde.general forum.

-- 
..Bill.
0
Bill
8/14/2008 5:11:03 PM
You need each field you have checked to be in the Group by clause

the _join1 in this QBE is not relevent since it does not like to another matching examle


Your SQL should be something like this

 select Transnumber, 
'A234567890123456789012345678901234567890' as AcctName,
trandate, accountnumber, subagencyref, sum(debit) as debit,
 sum(credit) as Credit, status
 from transactions 
 where Transnumber is null
 group by yransnumber,accountnumber, trandate, subagencyref, status



> {quote:title=daniel sr wrote:}{quote}
> I have a paradox question but I'm not sure where to post it. The question is how do I convert this QBE to a SQL query?
> 
> 
> 
>     qbe.Add('ANSWER: TransactionsImport.DB');
>     qbe.Add('');
>     qbe.Add(':IMSWIN:Transactions.db | TranNumber  |');
>     qbe.Add('                        | Check Blank , calc A234567890123456789012345678901234567890 as AcctName |');
>     qbe.Add('');
>     if GLOBAL_SubAgencyRef then
>     begin
>       qbe.Add(':IMSWIN:Transactions.db | TranDate | AccountNumber | SubAgencyRef | Debit             | Credit             | Status | ');
>       qbe.Add('                        | Check    | Check _join1  | Check        | Calc Sum as Debit | Calc Sum as Credit | HIST   | ');
>     end
>     else
>     begin
>       qbe.Add(':IMSWIN:Transactions.db | TranDate | AccountNumber | Debit             | Credit             | Status | ');
>       qbe.Add('                        | Check    | Check _join1  | Calc Sum as Debit | Calc Sum as Credit | HIST   | ');
>     end;
> 
> 
> Does the _join1 signify a GROUP BY clause in SQL so it's totaling the debits and credits per AccountNumber?
> 
> select trandate, accountnumber, subagencyref, sum(debit), sum(credit), status
> from transactions
> where status = 'HIST'
> group by accountnumber, trandate, subagencyref, status
> 
> Daniel
0
Brian
8/15/2008 1:46:07 AM
Reply:

Similar Artilces:

How to list groups and group members from Delphi
Sorry if this is the wrong group but I could not find anything that was obviously more appropriate. I need to be able to list the groups and the members of each group on a Netware server using a Delphi program. Can anyone point me to information on how to do this? Note that the only thing I know about Netware is how to spell it so I need the answer for dummies. :) Thanks. -- ..Bill. On Wed, 06 Dec 2006 15:15:35 -0800, Bill <no@no.com> wrote: > Sorry if this is the wrong group but I could not find anything that wa= s > obviously more appropriate. I need to be able ...

Delphi Paradox to Delphi SQL Anywhere
I need to convert a Delphi 3 app from Paradox tables to something more flexible/powerful. My app creates a limited number of complex transactions ( i.e. 200 to 300 transactions per month - each transaction has 300 to 400 fields in the primary file and links to about a dozen support files. What programming issues should I watch for in this conversion ( i.e. is using quicken style incremental search combo boxes a problem due to network traffic, etc. ) ??? What would be the conversion steps/Issues involved with this process ??? Obviously tables/relationships need to be created a...

Groups of groups
I need to add groups of users to a new group. Is there a way or workaround to do this? A customer is telling me that you can do in AD... Thanks Miguel Cando, Yes AD can do nested groups but eDirectory can't. One way to get around it is to use Dynamic Groups or create a new container and place the objects in there instead if possible. In all my years I've never had the need for nested groups. -- ___________________________________________ Niclas Ekstedt, CNA/CNE/CNS/CLS Network Consultant/NSC Sysop InfraSystems Solutions There is no "group of groups&quo...

Good (Free) Database Choice For Simple Local Database For Delphi 2009
For years I have used the BDE and dVolga ( no longer abailable ) but want to learn how to use other third-party and/or Delphi 2009 vcl components for simple databases. For a simple local database with only one table and 6-8 string fields with graphic field support for one field what is a good choice? What is available to do this without buying anything or possibly with a freeware component? Should I use DBExpress? Is a commercial database application necessary to create the database? Is something available from Microsoft as a free download to create and possibly edit a...

I know this is a Delphi group.. but...
The JBuilder groups seems so quiet that Im not sure they actually are alive... and Im too lazy to find out ;) I got a message regarding JBuilder... that it soon will be impossible to download it (in 2 days)... whats happening? -- best regards Kim Madsen TeamC4D www.components4developers.com The best components for the best developers High availability, high performance loosely coupled n-tier products Kim Madsen wrote: > I got a message regarding JBuilder... that it soon will be impossible > to download it (in 2 days)... whats happening? Only older versions...

Delphi and Oracle Database
Hello Everyone, I have a need to be able to read data out of an Oracle database. I know how I can access it - but now I need to bring the databases inhouse for development purposes. So - I need to install an oracle server - but only for my development needs - but it needs to be able to handle some large databases - from 5GB to 50GB approximately. I have been dealing with MSSQL and MySQL for a while - and I have those servers licenses and running. However, I am not familiar with how Oracle does things. Does anyone out there have some suggestions as to what type of licens...

grouping datas from database?
Normal 0 false false false EN-US X-NONE X-NONE ...

Problem with paradox database
Hi, Environment: PB8.0.0.6028, Win Xp Professional. Within an application I have to migrate data from a Paradox database to another database. Connecting to Paradox goes well, but as soon as I execute something else but a disconnect (e.g. SyntaxFromSql) the application crashes. From the Windows Xp messagebox that appears it seems the problem is with the dll mspbde40.dll, which is used to communicate with Paradox databases (afaik). Conenctioninfo: DBMS = 'ODBC' DbParm = "ConnectString='DBQ=d:\data;DRIVER={MICROSOFT PARADOX DRIVER (*.DB )};UID=;PWD=password;'C...

How to access Paradox Database
Hi all, I have one paradox database, I can access this database though MS ODBC Driver. When I access this database file I just can read the data. I cannot Delete, Insert and Update record from the database. Who know these problem and can slove that? Ivan What version of Paradox? How are you performing INSERT/DELETE/UPDATE? Using embedded SQL or via a datawindow? -- pbm_hopethishelps, Roy Kiesler [TeamSybase] Sybase Developer Network (SDN) - http://sdn.sybase.com MySybase - http://my.sybase.com "Ivan Lai" <ivanlai@schednet.com> wrote in message news:397D3...

Linux and Paradox Databases
------=_NextPart_000_0007_01C2B572.3436A1D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is it possible to use dbi + dbd-odbc to manipulate a paradox database on = a linux box? What drivers are available to use on a linux box? Thank You. Don ------=_NextPart_000_0007_01C2B572.3436A1D0-- Dne po 6. leden 2003 18:56 jste napsal(a): > Is it possible to use dbi + dbd-odbc to manipulate a paradox database on a > linux box? > > What drivers are available to use on a linux box? > > Thank You. >...

Connecting to Paradox Database
Please how can I connect to a paradox DB from ASA end? Waiting to hear from anybody who can assist. ...

delphi 2010 database
Hello, I’m new to this forum, currently I have application with MS Access and all works good for me. But I need more reliable without DLL or other dependencies (for Delphi 2010) I found many databases for Delphi, I prefer free or less than $100.00 Thanks On 2010-11-28 19:09:31 -0500, Falah Latino <> said: > Hello, > I’m new to this forum, currently I have application with MS Access and > all works good for me. > But I need more reliable without DLL or other dependencies (for Delphi 2010) > I found many databases for Delphi, > I prefer free or less tha...

Database with Delphi XE3
I've been using Delphi 7 Pro for years and have had to deal with the PDOXUSR.NET access denied problem with Vista OS and up anytime my application uses the Borland Database Engine. I'm thinking of buying Delphi XE3. Can someone tell me if the PDOXUSR.NET Access Denied problem has been taken care of in this version? With Windows 7, it seems that my apps will only run if I have the user reduce their User Account Control to a level the access is no longer denied. I'm hoping this is not an issue with XE3. I'm sorry if this is not the proper forum for my question. I there is a be...

Delphi Facebook group
Just wanted to mention that if I could need your support on facebook. I have started a group today called "Delphi Developer", more or less in protest to the other groups who create an image of Delphi as a dead language (boy do we have some surprices for you). Please join the group to show your support for the Delphi language. I want that group to be the best group for programming in 2011 - help make this a reality! http://www.facebook.com/group.php?gid=137012246341854&ref=mf Cheers Jon Lennart Aasenden Jolead media, Norway "Jon Lennart Aasenden" &...

Web resources about - Paradox group? - embarcadero.delphi.database

Allais paradox - Wikipedia, the free encyclopedia
, have supported the assertion that when presented with a choice between 1A and 1B, most people would choose 1A. Likewise, when presented with ...

The paradox of health and healing
Excuses we feed ourselves hold us back from being healthy and happy, leading &quot;medical intuitive&quot; says.

The Hillary Paradox: Q&A With Editor Joanne Bamberger
... House and has edited an anthology of 28 essays by women who span the political spectrum. Her book Love Her, Love Her Not: The Hillary Paradox ...

IDG Contributor Network: Merged channel's maddening paradox, Bed, Bath & Beyond style
In the earliest days of e-commerce, retail execs envisioned a Utopian merged channel future. As the percentage of retail dollars ever so slowly ...

Mojo Friday - A Paradox Of Modern Technology - Edition
And Our Dated Habits paradox noun par·a·dox \ˈper-ə-ˌdäks, ˈpa-rə-\ 1 : a tenet contrary to received opinion 2 a : a statement that is seemingly ...

The paradox of selling The Beginner's Guide
The Beginner's Guide released a couple days ago, and it made me feel stuff. If you are not averse to having feelings, you might want to play ...

Earth Bloomed Early: A Fermi Paradox Solution?
According to observations by Hubble and Kepler, the universe has only just begun to produce habitable worlds what does this mean for the evolution ...

Why The Black Hole Information Paradox Is Such A Problem
Black holes, to the best of our understanding, destroy the information that goes into them. Yet those properties should be fundamentally conserved. ...

The Paradox of Bernie Sanders - Richard North Patterson
The surge of money and enthusiasm propelling Bernie Sanders has long since trampled conventional wisdom. The question now is where that takes ...

Edward Snowden: Fermi Paradox, Or The Lack Of Real UFO Sightings And Alien Life In Space, Explained By ...
Edward Snowden has an interesting explanation for the Fermi paradox , which asks why we have not seen any real UFO sightings or communicated ...

Resources last updated: 12/2/2015 10:08:57 PM