sikharma13
Starting Member
44 Posts |
Posted - 2013-10-26 : 02:13:04
|
please help... due to limited number of characters..no query cant be read by visual fox pro..due to error 36..foxpro via mysql...here is the query..SQLExec(nPayroll,"insert into py_abcdeeh(province,municipality,barangay,household_id,entry_id,lastname,firstname,middlename,ext_name,no_eli_for_educ_grant)select m1.province,m1.municipality,m1.barangay,m1.household_id,m1.entry_id,m1.last_name,m1.first_name,m1.middle_name,m1.ext_name ,m2.countfrom m_abcdeeh m1inner join (select household_id,sum(case when eligible_for_educ_grant = 'yes' then 1 else 0 end) as count FROM m_abcdeeh GROUP BY household_id )m2on m2.household_id = m1.household_idwhere m1.grantee = 'yes'")SQLExec(nPayroll,Query)SQLExec(nPayroll,"select * from py_abcdeeh","abcdeehtemp")Thisform.grdPayroll.RecordSource = "abcdeehtemp"..i did something like this but the query is not working anymore..is there something wrong?? here is the query..Query = ["insert into py_abcdeeh(province,municipality,barangay,household_id,entry_id,lastname,firstname,middlename,ext_name,no_eli_for_educ_grant)]; +[select m1.province,m1.municipality,m1.barangay,m1.household_id,m1.entry_id,m1.last_name,m1.first_name]; +[,m1.middle_name,m1.ext_name ,m2.count]; +[from m_abcdeeh m1]; +[inner join (select household_id,sum(case when eligible_for_educ_grant = 'yes' then 1 else 0 end) as count]; +[FROM m_abcdeeh GROUP BY household_id]; +[)m2 on m2.household_id = m1.household_id]; +[where m1.grantee = 'yes'","abcdeehtemp"]SQLExec(nPayroll,Query)SQLExec(nPayroll,"select * from py_abcdeeh","abcdeehtemp")Thisform.grdPayroll.RecordSource = "abcdeehtemp"..thank you so much for the help..VFP9.0 via MySQL 5.0 |
|