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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.