Union of two queries using vb6.0 coding

Newbie Member
25Mar2010,23:41   #1
srbatcha's Avatar
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
Skilled contributor
26Mar2010,00:23   #2
techgeek.in's Avatar
what do u mean by connect out here...cud u explain me more??
Newbie Member
26Jan2011,06:35   #3
CrownSolution's Avatar
I have the same problem as this!.....can you help me out in joining two queries like this!

Thnx
Pro contributor
27Jan2011,04:10   #4
virxen's Avatar
...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?