Query troubles

Results 1 to 3 of 3

Thread: Query troubles

  1. #1
    Join Date
    Dec 1969

    Default Query troubles

    Why doesn&#039;t this work ?<BR>is it something to do with the "*" ?<BR><BR>sql = "SELECT [Governor].[TITLE], [Governor].[FORENAME], [Governor].[SURNAME], [GovernorPost].[appointed], [GovernorPost].[status], [Post].[govtype], [School].[s_name], [School].[DFEE_Number] FROM School INNER JOIN ((Governor INNER JOIN GovernorPost ON [Governor].[G_ID]=[GovernorPost].[G_ID]) INNER JOIN Post ON [GovernorPost].[PostID]=[Post].[PostID]) ON [School].[s_ID]=[Post].[S_ID] WHERE ((([school].[s_name]) Like &#039;"&s_Name&"&#039; & "*") AND (([Governor].[Forename]) Like &#039;"&surname&"&#039; & "*") AND (([governor].[forename]) Like &#039;"&Forename&"&#039; & "*"))) ORDER BY [post].[govtype] "<BR> <BR><BR>than you for helping.

  2. #2
    Join Date
    Dec 1969

    Default Please say you have SOME brains

    How will we know WHY it does not work? We have not finished the cource in mind reading. <BR><BR>Either come back in 4 months by which time we should have finished the cource <BR>OR<BR>Post the stupid error message and ALSO the SQL by using response.write<BR><BR>Brain Power.

  3. #3
    the other steve Guest

    Default yes i think so

    change the star stuff from<BR><BR>"&s_Name&"&#039; & "*"<BR><BR>to &#039;" & s_name "%&#039;" & ...<BR>the single quotes go outside all the search term : &#039;bob%&#039;<BR><BR>Oh yea, I think that the correct symbol is &#039;%&#039; but check on that.<BR><BR>or perhaps use the SQL term LIKE (search the www.w3schools.com site)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts