Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Confused on a ! in issue
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00402304
Message ID:
00402421
Views:
9
>>>You are using an INNER JOIN so if a store doesn't post anything, it won't
>>>show up in the result set and you won't know they didn't post. Try:
>>>SELECT ulog.storeno, ulog.postno, ulog.upldate, ;
>>>cnt(ulog.uplproc) as posted , store.phone ;
>>>  FROM storelst Store LEFTF OUTER JOIN ulogserv ulog   ;
>>>    ON ulog.storeno = store.store ;
>>> WHERE upldate between lddate1 and lddate2 ;
><b>   or isnull(lddate1) ;</b>
>>> group by 1,2,3
>>
>>Nope. that still misses the no transaction groups?
>>
>>__Stephen
>
>The WHERE clause is throwing it off because the LEFT OUTER JOIN will produce a
>null value in the field. I think the bold statement will take care of
>it.

Or you can use the NVL() function in the field list:
SELECT store.storeNo, NVL(ulog.postNo, 0), NVL(ulog.uplDate, {}), ;
etc.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform