Advertisement

05.10.2008 at 04:24AM PDT, ID: 23391477
[x]
Attachment Details

sql and null value

Asked by aldhubaib33 in Microsoft Access Database

Tags: , , ,

hi . i have the following sql in my query
SELECT TbMain.CountryID, TbMain.StateID, TbMain.KindID
, Avg(IIf([TBMain.Time]=Forms!FSalesStock!ReportDateStart,Price/Area)) AS [M2 Start]
, Avg(IIf([TBMain.Time]=Forms!FSalesStock!ReportDateEnd,Price/Area)) AS [M2 End]
, [M2 Start ]-[M2 End ] AS [M2 Difference]
FROM TbMain
WHERE ((([TBMain.Time])=[Forms]![FSalesStock]![ReportDateStart] Or ([TBMain.Time])=[Forms]![FSalesStock]![ReportDateEnd]))
GROUP BY TbMain.CountryID, TbMain.StateID, TbMain.KindID;

the sql is working fine, however both [M2 Start] and [M2 End] can have a null value, so what i want if either [M2 Start] and [M2 End] have a null value it shows " No data'
And for [M2 Difference] if one of the values is null it will show "No Change"Start Free Trial
[+][-]05.10.2008 at 04:30AM PDT, ID: 21538545

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 04:32AM PDT, ID: 21538550

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 04:36AM PDT, ID: 21538565

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: Microsoftg, access, 2007, sql and null value
Sign Up Now!
Solution Provided By: Thomasian
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.10.2008 at 02:08PM PDT, ID: 21540483

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 08:15PM PDT, ID: 21541352

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.11.2008 at 01:27AM PDT, ID: 21541828

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.11.2008 at 01:46AM PDT, ID: 21541867

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.11.2008 at 03:15AM PDT, ID: 21542010

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.11.2008 at 03:46AM PDT, ID: 21542056

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628