Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieve NULL or MAX()?
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Retrieve NULL or MAX()?
Divers
Thread ID:
01022042
Message ID:
01022042
Vues:
58
I need to return a query result from a datetime field in a child table that either returns NULL if "any" record that matches the condition is NULL or return MAX() if all matching records have non-null values.

To give you an example, if a person is given list of 10 tasks with a separate deadline date, I need a query that returns NULL date if any of the 10 task is not completed OR MAX() date if all tasks have been completed.

Anyone have a simple query statement for this? Thanks.
It's "my" world. You're just living in it.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform