I have a SQL query that I would like to present in a grid that would be for display only. The SQL works in mySQLWorkbench, phpMyAdmin, SQL Builder in Scriptcase but not in Scriptcase grid application. The connection is the same cor builder as in scriptcase application.
The script is:
select distinct ent.eventcode,ent.evtHeat,a.athletename Hname,a.score Hscore,a.place Hplace,a.points Hpoints,b.athletename Vname,b.score Vscore,b.place Vplace,b.points Vpoints
from entry ent
left join entryscore es on ent.entrykey=es.entrykey
left join meetmatchup mm on es.matchupkey=mm.matchupkey
left join DualResults a
on a.meetkey=ent.meetkey and a.matchupno=mm.matchupno and a.eventcode=ent.eventcode and a.evtHeat=ent.evtHeat and a.evtlane=ent.evtlane and a.teamtype=‘H’
left join DualResults b
on b.meetkey=ent.meetkey and b.matchupno=mm.matchupno and b.eventcode=ent.eventcode and b.evtHeat=ent.evtHeat and b.evtlane=ent.evtlane and b.teamtype=‘V’
where ent.eventtype !=‘S’
and ent.meetkey=1 and mm.matchupno=1
The error in Scriptcase is:
Error
Error while accessing the database
SelectLimit(SELECT distinct ent.eventcode as ent_eventcode, ent.evtHeat as ent_evtheat, a.athletename Hname as sc_field_0, a.score Hscore as sc_field_1, a.place Hplace as sc_field_2, a.points Hpoints as sc_field_3, b.points Vpoints as sc_field_7, b.place Vplace as sc_field_6, b.athletename Vname as sc_field_4, b.score Vscore as sc_field_5 from entry ent left join entryscore es on ent.entrykey=es.entrykey left join meetmatchup mm on es.matchupkey=mm.matchupkey left join DualResults a on a.meetkey=ent.meetkey and a.matchupno=mm.matchupno and a.eventcode=ent.eventcode and a.evtHeat=ent.evtHeat and a.evtlane=ent.evtlane and a.teamtype=‘H’ left join DualResults b on b.meetkey=ent.meetkey and b.matchupno=mm.matchupno and b.eventcode=ent.eventcode and b.evtHeat=ent.evtHeat and b.evtlane=ent.evtlane and b.teamtype=‘V’ where ent.eventtype !=‘S’ and ent.meetkey=1 and mm.matchupno=1, 82, 0)
It does not seem to really be really an access issue…
Please help!