ufone Posted August 22, 2012 Share Posted August 22, 2012 thanks insert into dlyatten (code, date, type, category, scode, lCode, sec,syear ) ; select code, m.pDate, 1, "P", scode, lCode, Sec,ssyear ; from Student st ; WHERE Admtd = 1 ; AND NOT EXISTS (SELECT * FROM dlyatten dl ; WHERE dl.code = st.code AND date=pdate ) i want to use with sqlexec command Quote Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/ Share on other sites More sharing options...
Barand Posted August 22, 2012 Share Posted August 22, 2012 remove the semi-colons Quote Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1371490 Share on other sites More sharing options...
ufone Posted August 23, 2012 Author Share Posted August 23, 2012 thanks this portion of codes is working well. text to lcSQL noshow insert into dlyatten (code, date, type, category, scode, lCode, sec,syear ) values (?dcode,?ddate,1,'P',?dscode,?dlcode,?dsec,2012 ) endtext pDate = date() SQLExec(m.kpshandle, m.lcSQL) but this is not working AND NOT EXISTS (SELECT * FROM dlyatten dl WHERE dlyatten.code = studentaten.code AND dlyatten.date=m.pdate ) thanks Quote Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1371721 Share on other sites More sharing options...
fenway Posted August 26, 2012 Share Posted August 26, 2012 What does 'not working' mean Quote Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1372570 Share on other sites More sharing options...
ufone Posted August 27, 2012 Author Share Posted August 27, 2012 receive error here\ AND NOT EXISTS (SELECT * FROM dlyatten dl WHERE dlyatten.code = studentaten.code AND dlyatten.date=m.pdate ) Quote Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1372927 Share on other sites More sharing options...
Barand Posted August 27, 2012 Share Posted August 27, 2012 Either remove the table alias or use it Quote Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1372936 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.