Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Field Group on Field Empty Null
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01676694
Message ID:
01676696
Views:
34
Likes (1)
>Hi,
>First, I thought I posted this question yesterday but I cannot see it. I must have not pressed Send or simply do not see it. Sorry if it is a duplicate post.
>
>I am working on a report where there is a SELECT field and GROUP By as follows:
>
>select <<cFieldName>> as GROUP_ID, SUM......    GROUP BY <<cFieldName>>
>
Hi,
select NVL(<<cFieldName>>, 0) as GROUP_ID, SUM......    GROUP BY NVL(<<cFieldName>>, 0) && for VFP
select COALESCE(<<cFieldName>>, 0) as GROUP_ID, SUM......    GROUP BY COALESCE(<<cFieldName>>, 0) && for MSSQL/ORACLE
MartinaJ

>
>The problem is that the value in cFieldName is sometimes empty and sometimes NULL. So, resulting query has to "empty" records; one for empty and one for NULL. But in the report they look the same, EMPTY.
>
>How can I change the SQL Select to roll both the EMPTY and NULL records into one?
>
>TIA
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform