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 gkittelson 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. bemoCannon

    Sql Query

    what would be the most efficient way of solving the null return problem? I'm very new with SQL so the only way I know is to perform a separate query with the list of memberid's attainted from the above to get the account fields? Doing this by obtaining just the memberid into a String and the...
  2. bemoCannon

    Sql Query

    Thanks again. If I have a SUM, AVG.... or any of these functions in the SELECT statement, don't I need the GROUP BY clause? If there is a more refined way please let me know. Also, I realise the reason for the null values, but what would be the most effecient way of solving it? I'm very new...
  3. bemoCannon

    Sql Query

    Hi and thanks in advance. The code below returns the members who have accounts that are inactive, and works correctly thanks to r937. It returns the memberid, but returns null values for the barcode values. How can I fix this problem? Thanks select member.memberid, account.barcode FROM...
  4. bemoCannon

    Sql Query

    Apologies r937 and thanks a lot. It worked perfectly.
  5. bemoCannon

    Sql Query

    I have made a mistake in my original post: To detect expired accounts, the query should be: (curdate() > enddate OR closed <> 0) //Expired accounts Thanks r937, There are two problems with this though. Firstly, the account.memberid is a foreign key, so to maintain referential integrity, this...
  6. bemoCannon

    Sql Query

    Hi everyone and thanks in advance. I have two tables, one for members and one for accounts. Every member can have multiple accounts. Accounts have a lifespan, which is specified by start and end dates, and can be terminated early with a closed tinyint variable. I want to query all the members...

Part and Inventory Search

Back
Top