Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

exclude data in load

Hello,

Need to exclude some rows in load, like

where not

(companykey=1 and monthkey >=201201) or

(companykey=2 and monthkey >=201206)

But it seems not to work.

Any idea how to do it?

br, timo v

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

This seems to work :

Where

          not (

(companykey=1 and monthkey >=201201) or

(companykey=2 and monthkey >=201206)

);

View solution in original post

5 Replies
giakoum
Partner - Master II
Partner - Master II

some sample data would help

Not applicable
Author

Hello Ioannis,

Here's an example

compkey mthkey amount

1 201101 100

1 201102 110

1 201103 120

1 201104 130

1 201105 140

1 201106 150

1 201107 160

1 201108 170

1 201109 180

1 201110 150

1 201111 130

1 201112 120

1 201201 110

1 201202 130

1 201203 140

1 201204 150

1 201205 160

1 201206 100

Where rows >=201201 should be excluded in load, and the same for an othet customer with an other time period

br

timo v

giakoum
Partner - Master II
Partner - Master II

This seems to work :

Where

          not (

(companykey=1 and monthkey >=201201) or

(companykey=2 and monthkey >=201206)

);

Not applicable
Author

I think you could use Ioannis solution or:

where not

(companykey=1 and monthkey >=201201) and not

(companykey=2 and monthkey >=201206)

Regards

Not applicable
Author

sorry for deleay, thx this worked

timo v