<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>25 May 2015 15:36:00 Z</lastBuildDate><pubDate>15 May 2015 14:25:00 Z</pubDate><description>I have been banging my head for 4 day in trying to solve this problem. As I have not been able to solve this problem I am posting it here for assistance.&#13;
&#13;
I have following data structure&#13;
-- Creating the attendence table CREATE TABLE "attendence" ( "attendence_id" INTEGER PRIMARY KEY , "attendence_standard_id" INTEGER , "attendence_division_id" INTEGER , "attendence_subject_id" INTEGER , "attendence_student_id" INTEGER , "attendence_date" DATE , "attendence_present_absent" SMALLINT , "attendence_lecture_id" INTEGER ); -- Creating the division_master table CREATE TABLE "division_master" ( "division_master_id" INTEGER PRIMARY KEY , "division_master_name" VARCHAR(50) ); -- Creating the enrollment_details table CREATE TABLE "enrollment_details" ( "enrollment_details_id" INTEGER PRIMARY KEY , "enrollment_details_student_id" INTEGER , "enrollment_details_standard_id" INTEGER , "enrollment_details_subject_id" INTEGER , "enrollment_details_division_id" INTEGER , "enrollment_details_Serial_no" VARCHAR(50) , "enrollment_details_year_id" INTEGER ); -- Creating the standard_master table CREATE TABLE "standard_master" ( "standard_master_id" INTEGER PRIMARY KEY , "standard_master_name" VARCHAR(50) ); -- Creating the student_master table CREATE TABLE "student_master" ( "student_master_id" INTEGER PRIMARY KEY , "student_master_roll_no" VARCHAR(50) , "student_master_fname" VARCHAR(50) , "student_master_mname" VARCHAR(50) , "student_master_sname" VARCHAR(50) , "student_master_mobile_no" VARCHAR(15) , "student_master_email_id" VARCHAR(200) , "student_master_dob" DATE , "student_master_gender" INTEGER , "student_master_fees_paid" BIT , "student_master_std_id" INTEGER , "student_master_div_id" INTEGER , "standard_master_fees_paid" BIT ); CREATE INDEX "WDIDX_student_master_student_master_roll_no" ON "student_master" ("student_master_roll_no"); CREATE INDEX "WDIDX_student_master_student_master_fnamestudent_master_mnamestudent_master_sname" ON "student_master" ("student_master_fname","student_master_mname","student_master_sname"); -- Creating the subject_master table CREATE TABLE "subject_master" ( "subject_master_id" INTEGER PRIMARY KEY , "subject_master_name" VARCHAR(50) );&#13;
I am using following SQL Query to retrieve Attendance of student&#13;
SELECT attendence.attendence_id AS attendence_id, attendence.attendence_standard_id AS attendence_standard_id, attendence.attendence_division_id AS attendence_division_id, attendence.attendence_subject_id AS attendence_subject_id, attendence.attendence_date AS attendence_date, attendence.attendence_student_id AS attendence_student_id, attendence.attendence_present_absent AS attendence_present_absent, student_master.student_master_roll_no AS student_master_roll_no, student_master.student_master_fname AS student_master_fname, student_master.student_master_mobile_no AS student_master_mobile_no, student_master.student_master_email_id AS student_master_email_id FROM student_master, attendence WHERE attendence.attendence_student_id = student_master.student_master_id AND ( attendence.attendence_date BETWEEN {ParamFromDate} AND {ParamToDate} AND attendence.attendence_student_id = {ParamStuID} ) ORDER BY student_master_roll_no ASC Here is the WL code&#13;
I is int = 1 //First Validate Data IF EDT_FromDate &gt; EDT_ToDate THEN Error("Please select proper dates","From Date cannot be greater than To Date") RETURN END LooperDeleteAll(LOOP_Attendence) QRY_StudentAttendenceView.ParamFromDate = EDT_FromDate QRY_StudentAttendenceView.ParamToDate = EDT_ToDate QRY_StudentAttendenceView.ParamStuID = 1 //StudentID HExecuteQuery(QRY_StudentAttendenceView) I = 1 IF HNbRec(QRY_StudentAttendenceView) &gt; 0 THEN HReadFirst(QRY_StudentAttendenceView) LooperAdd(LOOP_Attendence) LOOP_Attendence.ATT_AttendenceID = QRY_AttendenceOfSelectedStudent.attendence_id //&lt;== This gives Error (Null Exception or some funny message like Field name not found in Query used, etc.) LOOP_Attendence.ATT_Is_Present = QRY_AttendenceOfSelectedStudent.present_absent //&lt;== This also gives Error //Even if we try to use Info it gives error //.... other code removed for brevity ELSE Error("Cannot find students as per selected Date Range") END //IF HNbRec(QRY_StudentAttendence) &gt; 0 THEN&#13;
The surprising part is that if I remove the date condition for Query it works!&#13;
&#13;
It also works if I just use one Data condition like for example: attendence.attendence_date = {ParamFromDate} :o&#13;
&#13;
What to do?&#13;
&#13;
What must be the error?&#13;
&#13;
Has anyone faced such a problem?&#13;
&#13;
Please guide me to solve this error.&#13;
&#13;
TIA&#13;
&#13;
Yogi Yang</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp</link><title>[WM17] - Why this SQL is giving Error</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-solved-52277/read.awp</comments><pubDate>25 May 2015 15:36:00 Z</pubDate><description>I have tried many things to solve the error but could not. But yesterday I managed to get it to work but in a very inefficient w…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-solved-52277/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-solved-52277/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error (SOLVED)</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52139/read.awp</comments><pubDate>16 May 2015 06:52:00 Z</pubDate><description>Quote&#13;
Alexandre Leclerc&#13;
&#13;
- Are you using HFSQL or MySQL? (The date format might be an issue. And also for the BETWEEN syntax,…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52139/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52139/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52137/read.awp</comments><pubDate>15 May 2015 23:57:00 Z</pubDate><description>It could be missing double-quote for the date ie&#13;
&#13;
attendence.attendence_date BETWEEN "20150501" AND "20150515"&#13;
&#13;
try info you…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52137/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52137/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52135/read.awp</comments><pubDate>15 May 2015 20:01:00 Z</pubDate><description>Hi Yogi,&#13;
&#13;
- Are you using HFSQL or MySQL? (The date format might be an issue. And also for the BETWEEN syntax, maybe...)&#13;
- Is…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52135/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52135/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52130/read.awp</comments><pubDate>15 May 2015 17:43:00 Z</pubDate><description>Hi Yogi,&#13;
&#13;
I think Alexandre has answered your question :confused:&#13;
&#13;
In your code:&#13;
- You set the params of the query&#13;
- You e…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52130/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52130/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52129/read.awp</comments><pubDate>15 May 2015 17:43:00 Z</pubDate><description>@Darren,&#13;
I don't think this is Date issue as the query will execute if I use only one data in condition!&#13;
&#13;
@Bart,&#13;
You caught …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52129/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52129/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52128/read.awp</comments><pubDate>15 May 2015 17:36:00 Z</pubDate><description>Quote&#13;
Paulo Oliveira&#13;
&#13;
what is the error returned by HExecuteQuery&#13;
&#13;
try with:&#13;
&#13;
 if not HExecuteQuery(QRY_StudentAttendence…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52128/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52128/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52124/read.awp</comments><pubDate>15 May 2015 15:23:00 Z</pubDate><description>Hi Yogi,&#13;
&#13;
You are executing the query QRY_StudentAttendenceView then you try to use a field from the (probably not initialized…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52124/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52124/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52123/read.awp</comments><pubDate>15 May 2015 15:19:00 Z</pubDate><description>Hey Yogi&#13;
&#13;
Isn't there anything wrong with your query naming?&#13;
&#13;
You execute QRY_StudentAttendenceView&#13;
&#13;
And for filling your …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52123/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52123/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52122/read.awp</comments><pubDate>15 May 2015 15:12:00 Z</pubDate><description>Yogi,&#13;
&#13;
I'm not surprised you seem to be having problems with dates. I've not yet come across a DBMS that isn't picky about dat…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52122/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52122/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52120/read.awp</comments><pubDate>15 May 2015 14:57:00 Z</pubDate><description>what is the error returned by HExecuteQuery&#13;
try with:&#13;
if not HExecuteQuery(QRY_StudentAttendenceView) then&#13;
error(errorinfo())…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52120/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error-52120/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/52118-wm17-why-this-sql-giving-error/read.awp">[WM17] - Why this SQL is giving Error</source><title>Re: [WM17] - Why this SQL is giving Error</title></item></channel></rss>
