Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
aaronnayan
Creator III
Creator III

HELP excluding a certain value from a field

HI in the script

LOAD BRNO AS LNK_BRNO,

  BRNO,

    BRENAME,

   RSMENAME,

   DSDENAME

FROM*********************************************(qvd)

WHERE EXISTS (LNK_BRNO,BRNO) AND (DSDENAME<>'CLOSED'

1. There is a value in the DSDENAME field column called CLOSED that i do not want to include into the script. Can anyone help me with this please?

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

This should work?

LOAD *

WHERE DSDENAME<>'CLOSED';

LOAD BRNO AS LNK_BRNO,

  BRNO,

    BRENAME,

   RSMENAME,

   DSDENAME

FROM*********************************************(qvd)

WHERE EXISTS (LNK_BRNO,BRNO) ;

View solution in original post

6 Replies
adamdavi3s
Master
Master

This should work?

LOAD *

WHERE DSDENAME<>'CLOSED';

LOAD BRNO AS LNK_BRNO,

  BRNO,

    BRENAME,

   RSMENAME,

   DSDENAME

FROM*********************************************(qvd)

WHERE EXISTS (LNK_BRNO,BRNO) ;

sunny_talwar

But why would this not work Adam?

LOAD BRNO AS LNK_BRNO,

  BRNO,

    BRENAME,

   RSMENAME,

   DSDENAME

FROM*********************************************(qvd)

WHERE EXISTS (LNK_BRNO,BRNO) AND (DSDENAME<>'CLOSED';

adamdavi3s
Master
Master

I wasn't aware you could mix where and where exists like that but of course you can, sorry I keep my QVD loads optimised so not a situation I've really messed with before

Maybe its just a case of an erroneous bracket then and this will work?

LOAD BRNO AS LNK_BRNO,

  BRNO,

    BRENAME,

   RSMENAME,

   DSDENAME

FROM*********************************************(qvd)

WHERE EXISTS (LNK_BRNO,BRNO) AND DSDENAME<>'CLOSED';

sunny_talwar

Yup that could be the issue

aaronnayan
Creator III
Creator III
Author

THANKS GUYS FOR ALL THE HELP

ADAM U SMASHED IT CHEERS PAL

adamdavi3s
Master
Master

We're glad to help

Please remember to close the thread by marking the correct (and any helpful) answers