Topic: Report SQL

Hi All,
Can anyone tell me what I'm doing wrong here.

select jobs.id, jobs.cust_n, jobs.del_n, jobs.your_ref, jobs.our_ref,
           joblines.id, joblines.description, allocate.jobline, 
             allocate.location,allocate.id
   from jobs, joblines, allocate
     where jobs.id = '+jobsfiles.edit5.text+'                                 
     and joblines.id_jobs = jobs.id
      and allocate.jobline = joblines.id;
       

The error is in the  '+jobsfiles.edit5.text+'    statement, so not getting the value of edit5

Kind regards

John

2 (edited by sparrow 2021-10-15 16:53:23)

Re: Report SQL

if you use Report SQL or Button action SQL query use

{edit5}

where jobs.id = {edit5}

http://myvisualdatabase.com/help_en/SQLquery.html


in script sql query
use '+jobsfiles.edit5.sqlValue+'  or  '''+jobsfiles.edit5.text+'''

http://myvisualdatabase.com/help_en/script_edit.html

Re: Report SQL

Yes that worked perfectly.
Many many thanks.

John