Suppose we've got a table like this:
Change a bit the script
we may see new seventh employee
But if we change a bit properties of EmployeeID field (Show Frequency)
we will see that the sixth employee presented twice
To avoid duplicating we need to check EmployeeID field like this:
It's a key moment.
Now change a script like this (ADD ONLY)
but if we Run Partial (Ctrl+Shift+R) we see
At the and let's come back to previous script without ADD ONLY and Exists keywords
Every time we Run Partial (Ctrl+Shift+R) we see that duplicates grow again
and again
Office:Field EmployeeID looks like
LOAD * INLINE [
EmployeeID, Name
1, 100
2, 200
3, 300
4, 400
5, 500
6, 600
];
Change a bit the script
Office:run again it (Ctrl+R) and take a look at EmployeeID field
LOAD * INLINE [
EmployeeID, Name
1, 100
2, 200
3, 300
4, 400
5, 500
6, 600
];
Office:
LOAD * INLINE [
EmployeeID, Name
6, 600
7, 700
];
we may see new seventh employee
But if we change a bit properties of EmployeeID field (Show Frequency)
To avoid duplicating we need to check EmployeeID field like this:
Office:
LOAD * INLINE [
EmployeeID, Name
1, 100
2, 200
3, 300
4, 400
5, 500
6, 600
];
Office:
LOAD * INLINE [
EmployeeID, Name
6, 600
7, 700
]
Where not Exists(EmployeeID);
It's a key moment.
Now change a script like this (ADD ONLY)
Office:and Run it(Ctrl+R). We see
LOAD * INLINE [
EmployeeID, Name
1, 100
2, 200
3, 300
4, 400
5, 500
6, 600
];
Office:
ADD ONLY LOAD * INLINE [
EmployeeID, Name
6, 600
7, 700
]
Where not Exists(EmployeeID);
but if we Run Partial (Ctrl+Shift+R) we see
At the and let's come back to previous script without ADD ONLY and Exists keywords
Office:
LOAD * INLINE [
EmployeeID, Name
1, 100
2, 200
3, 300
4, 400
5, 500
6, 600
];
Office:
ADD LOAD * INLINE [
EmployeeID, Name
6, 600
7, 700
];
//Where not Exists(EmployeeID);
Every time we Run Partial (Ctrl+Shift+R) we see that duplicates grow again
and again
Copyright © 2015 Ruslan Goncharov
No comments:
Post a Comment