Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Bosnoval

    Search query

    Ah wow, thank you! I believe that has got it. ************* Start My current SQL query ************* SELECT DISTINCT Pictures.PicFilename, Pictures.PicId, Pictures.PicDate ...truncated statement FROM (Pictures LEFT JOIN Attributes ON Pictures.PicId=Attributes.PicId) LEFT JOIN KeyWords...
  2. Bosnoval

    Search query

    I thought examples of what I meant by the JOIN comparison may help... Two examples of a valid record that exist in just one table: 1) A call for a KeyWords.Keyword but "Any" Attributes.Data 2) The reverse, a call for a Attributes.Data but "Any" KeyWords.Keyword One example of a valid record...
  3. Bosnoval

    Search query

    Using my last posted SQL query statistically helps because there are far more records, about a 10:1 ratio, that fall under the case of having a, KeyWords.Keyword and no Attributes.Data, than there are records that have a, Attributes.Data and no KeyWords.Keyword. However, as expected the test...
  4. Bosnoval

    Search query

    My problem is definately the JOIN unfortunately I don't know how to fix it. On a hunch I inverted your statement from: FROM Pictures LEFT JOIN ( Attributes LEFT JOIN KeyWords ON Attributes.PicId=KeyWords.PicId ) ON Pictures.PicId=Attributes.PicId to: FROM Pictures LEFT JOIN ( KeyWords LEFT...
  5. Bosnoval

    Search query

    Looking over the results with the simplified SQL statement the pictures omitted are exactly the records that lack a Attributes.Data field. Doesn't this mean the JOIN is somehow responsible? The JOIN in on the PicId. The PicId for the omitted records would only exist in the Pictures table...
  6. Bosnoval

    Search query

    Maybe I am having a Null/field comparison issue here. Running this below also failed to give a complete listing of records. ***************************** SELECT DISTINCT Pictures.PicFilename, Pictures.PicId, Pictures.PicDate ...truncated statement FROM Pictures LEFT JOIN ( Attributes LEFT...
  7. Bosnoval

    Search query

    This is just running using a DSN on a Windows 2000 server. SQL server, etc. is not installed. The "Is Null" statements should work but the result is still the same as my original SQL statement. The LEFT JOIN simply adds entries from the Attributes or KeyWords table that match the given...
  8. Bosnoval

    Search query

    Thank you again, your swift replies are much appreciated! This produced an unexpected result though. The resulting table contains a lot of mismatched records. ************* Start My current SQL query ************* SELECT DISTINCT Pictures.PicFilename, Pictures.PicId, Pictures.PicDate...
  9. Bosnoval

    Search query

    Well, I just realized the test case I was using to test the modified SQL statement wasn't quite right. It turns out the before and after SQL statements are actually producing the same results afterall. All of the same records are still being omitted. I believe I've read somewhere that using...
  10. Bosnoval

    Search query

    Thank you for your help. When using JOIN in this way is it still necessary to have: Attributes.PicId = Pictures.PicId Attributes.PicId = KeyWords.PicId in the WHERE clause? The results using the LEFT JOIN as you specified below has already helped by including records that were being left...
  11. Bosnoval

    Search query

    Hello, I'm trying to find a solution to a simple search engine's SQL query problem. At the moment my query has a flaw that makes it leave out valid records if the user selects "Any" from a dynamic option (drop down list) menu instead of actually selecting an individual statement. I assigned...

Part and Inventory Search

Back
Top