Hi All
I am working on creating a form in MS InfoPoint 2003 SP2
InfoPoint automatically creates the following code to join two tables together based on the proj_code field. (This code works fine and brings back the expected results set)
Code:
shape {select [proj_code],[proj_title],[proj_teamnames],[proj_sector],
[proj_reviewdate] from [projects] as [projects]} as [projects]
append ({select [l_id],[proj_code],[l_section],[l_actionby],[l_targetdate],
[l_problem],[l_solution],[l_rank] from [lessons]}
relate [proj_code] TO [proj_code]) as [lessons]
Now i want to do a wildcard search on the proj_title field, and this is what i tried (shown in bold):
Code:
shape {select [proj_code],[proj_title],[proj_teamnames],[proj_sector],
[proj_reviewdate] from [projects] as [projects]} as [projects]
append ({select [l_id],[proj_code],[l_section],[l_actionby],[l_targetdate],
[l_problem],[l_solution],[l_rank] from [lessons]}
relate [proj_code] TO [proj_code]) as [lessons]
WHERE ([projects].[proj_title] LIKE "%test%")
This doesn't work and i get errors saying that there is an error somewhere around
Code:
"[lessons] WHERE ([projects].[proj_title]"
I have a basic knowledge of mySQL but none of MSSQL, so this has got me a bit stumped.
I have got to use the code that is in the first code snippet as this is what InfoPath provides, so please dont re-write a completely different sql statement as the answer (I would do it a lot different to this if i had the choice!!!).
The answer must be based on the statement format above, ideally just tagging some more "code" onto the end.
Anyone able to help??
PS
(I dont know what the "shape" is at the start of the sql statement, but its seems to be something that InfoPoint needs. Its definitely not the cause of the problem since the first snippet of code above works fine with it in.)