sql in realbasic, "group by" 
Author Message
 sql in realbasic, "group by"

This query against a realbasic database works great:

q = "select ytd_labor.branch_id, ytd_labor.area, ytd_labor.ytd_amount "
q = q + "from ytd_labor, branch_mapping "
q = q + "where ytd_labor.branch_id = branch_mapping.branch_id "
q = q + "and ytd_labor.ytd_amount <> 0 "
q = q + "and ytd_labor.branch_id = '04' OR   "
q = q + "ytd_labor.branch_id = '07'  "

however this query does not:

q = "select ytd_labor.branch_id, ytd_labor.area, sum(ytd_labor.ytd_amount) "
q = q + "from ytd_labor, branch_mapping "
q = q + "where ytd_labor.branch_id = branch_mapping.branch_id "
q = q + "and ytd_labor.ytd_amount <> 0 "
q = q + "and ytd_labor.branch_id = '04' OR   "
q = q + "ytd_labor.branch_id = '07'  "
q = q + "group by ytd_labor.branch_id, ytd_labor.area "

Is there a problem with the SUM and GROUP BY statements in RB 2.02 or is there
some subtle problem with my syntax (which works fine with SQL+ which I used a
lot at work.

I also have not been able to get this to work with DR 2.1a25, however it works
better with 2.1a25.



Wed, 10 Jul 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem about "comp.lang.basic.realbasic"…

2. Printing "reports" with RealBasic

3. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

4. SQL Trigger Cause unnecessary "Confirm Cancel"

5. SQL Server Magazine Poll "RESULTS"

6. Pervasieve.SQL "Free" Upgrade

7. "No SQL Directives have been set"

8. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

9. Rebirth of "Doit", the Dutch Smalltalk User Group

10. porting TopSpeed "GROUP"s to mySQL

11. "groups" in Scheme

12. Python "Special Interest Group" mailing lists

 

 
Powered by phpBB® Forum Software