Currently I have the data in a table that look like below:
#Tbl_A
Id Customer_Id Indicator
1 912538132 1
2 912538132 2
3 912538132 3
4 912538132 1
5 912538132 1
6 912538132 2
7 912538132 1
8 912538132 2
9 912538132 3
10 912538132 4
Here I need to transfer the above #Tbl_A data to #Tbl_B table by applying a filters like: the indicator should be greater than or equal to 3.
EXAMPLE-DATA after loading the data into the #Tbl_B
#Tbl_B
Id Customer_Id Indicator
1 912538132 1
2 912538132 2
3 912538132 3
7 912538132 1
8 912538132 2
9 912538132 3
10 912538132 4
NOTE: The rest of the data should not insert into the #Tbl_B..since the sequence of indicators are not greater than or equal to 3.
I have tried with BETWEEN
and IN
operators. But I am getting the unexpected results in the #Tbl_B.