Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Union of two queries using vb6.0 coding (http://www.go4expert.com/forums/union-queries-using-vb60-coding-t21522/)

srbatcha 25Mar2010 23:41

Union of two queries using vb6.0 coding
 
i have two query:

#1. Year wise Report:

rec.Open "select Sales_Person_ID,Employee_Name,sum(Total_value),div ision_name,segment_name from segment_trans where (segment_trans.date >= #" & (fdate.Text) & "# and segment_trans.date<= #" & (tdate.Text) & "# ) GROUP BY Sales_Person_ID ,Employee_Name,division_name,segment_name order by division_name,segment_name", con, adOpenKeyset, adLockOptimistic

#2. Month wise Report:

rec1.Open "select Sales_Person_ID,Employee_Name,sum(Total_value),div ision_name,segment_name from segment_trans where (segment_trans.date >= #" & (Text3.Text) & "# and segment_trans.date<= #" & (Text4.Text) & "# ) GROUP BY Sales_Person_ID ,Employee_Name,division_name,segment_name order by division_name,segment_name", con, adOpenKeyset, adLockOptimistic


How to connect this two Queries with in one Query?


please help me.


Thanks
sathik
srbatca_29@yahoo.com

techgeek.in 26Mar2010 00:23

Re: Union of two queries using vb6.0 coding
 
what do u mean by connect out here...cud u explain me more??

CrownSolution 26Jan2011 06:35

Re: Union of two queries using vb6.0 coding
 
I have the same problem as this!.....can you help me out in joining two queries like this!

Thnx

virxen 27Jan2011 04:10

Re: Union of two queries using vb6.0 coding
 
...where (segment_trans.date >= #" & (fdate.Text) & "# and segment_trans.date<= #" & (tdate.Text) & "# and segment_trans.date >= #" & (Text3.Text) & "# and segment_trans.date<= #" & (Text4.Text) & "#).....

have you tried this?


All times are GMT +5.5. The time now is 11:22.