Reputation: 594 Enlightened
- Active Posts:
- 3,068 (1.25 per day)
- 19-May 09
- Profile Views:
- Last Active:
- Jan 30 2016 11:43 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
- Expert In:
Posts I've Made
Posted 5 Dec 2015Here's a different approach, perhaps, that might simplify your problem.
Your underlying problem is the same as that addressed by search engines: you have a number of documents (analogous to web pages) and you want to serve up a list of documents relevant to criteria that users enter. So, you probably can get a lot of practical information by studying SEO techniques. Google (meaning Google's own site, not googling for information) has a great deal of information on this. You might start here.
The information on how to make pages easier to find translates into how to make your own documents easier to find. As you begin to get ideas on improving the findability of the documents, you should begin to home in on more specific ideas on how to create the engine that finds them.
Posted 5 Dec 2015Your class diagram looks pretty good. What you are missing is formalized detail about the use cases. This is handled with a use case narrative. You can find out more about those here. If you want to support your narrative with a diagram, use an Activity diagram. Going through this exercise may well uncover other classes that you will need.
Posted 5 Dec 2015In terms of set theory, an inner join returns the intersection of two sets. If one of the sets is empty, then the intersection is also empty. So, if you have three inner joins, you will get an empty result set if any of the joined sets is empty.
Now, a left join returns all values in the leftmost of the two sets, and only those in the right set that match values in the left set. If there are no values in the right set, the result will have a record with null values for the fields in that set. There is also a right join, where the reverse is true, and an outer join (in most flavors of SQL), which combines left and right joins and can get slow and unwieldy quickly, especially if you are using more than one.
Suppose you have these tables:
TableA ID FName LName 1 Bob Rodes 2 John Rodes 3 David Rodes TableB ID AID EyeColor 1 1 Green 2 3 Brown
SELECT FName, LName, EyeColor FROM TableA a INNER JOIN TableB b ON a.ID = b.AID SELECT FName, LName, EyeColor FROM TableA a LEFT JOIN TableB b ON a.ID = b.AID
will have these results:
FName LName EyeColor Bob Rodes Green David Rodes Brown FName LName EyeColor Bob Rodes Green John Rodes NULL David Rodes Brown
So, as modi says, you probably are looking to use LEFT JOIN.
Posted 5 Dec 2015While VB6 is as dead as a vampire, it is also vastly superior to VB.Net in terms of ease of use and access to low-level routines. However, only old people are allowed to use it.
Posted 5 Dec 2015This should work, and is a nested query:
SELECT COUNT(*) FROM (SELECT DISTINCT PlayQuery FROM PLAYS)
Your code doesn't save the file anyway. The way to do that would be
SELECT DISTINCT PlayQuery INTO DistinctPlayersQuery FROM PLAYS SELECT COUNT(*) FROM DistinctPlayersQuery DROP TABLE DistinctPlayersQuery
If you just "save the SQL" you are actually creating a stored procedure, or you would save as a text file--but to do that, you'd have to use the SQL Server Manager to load and execute it.
- Member Title:
- Lovable Curmudgeon
- 59 years old
- September 15, 1956
- Manchester, Tennessee
- IT, Music.
- Forum Leader:
- VB6, VB.NET
- Full Name:
- Bob Rodes
- Years Programming:
- Programming Languages:
- Click here to e-mail me