pacificpear
Programmer
I am using SQL Server
I have a view name called " replica"
A B C D
000185700681 001 000185701034 001
000185700681 001 000185701034 001
000185700681 001 000185701034 001
000185700681 002 000185701034 002
000185700681 002 000185701034 002
000185700681 003 000185701034 003
000185700681 003 000185701034 003
000185700681 004 000185701034 004
000185700681 004 000185701034 004
000185700681 005 000185701034 005
000185700681 005 000185701034 005
000185700681 006 000185701034 006
000185700681 006 000185701034 006
My question is:
result
1.Add another column with name E
2.We have to check if the combination of Column C and Column D is there in the combination of Column A and Column B if it does not exist then print in the column D number into column E
IF it does exiest then check teh coresponding two column and check again and print the last combination column D in column E
Can anybody help
PP
I have a view name called " replica"
A B C D
000185700681 001 000185701034 001
000185700681 001 000185701034 001
000185700681 001 000185701034 001
000185700681 002 000185701034 002
000185700681 002 000185701034 002
000185700681 003 000185701034 003
000185700681 003 000185701034 003
000185700681 004 000185701034 004
000185700681 004 000185701034 004
000185700681 005 000185701034 005
000185700681 005 000185701034 005
000185700681 006 000185701034 006
000185700681 006 000185701034 006
My question is:
result
1.Add another column with name E
2.We have to check if the combination of Column C and Column D is there in the combination of Column A and Column B if it does not exist then print in the column D number into column E
IF it does exiest then check teh coresponding two column and check again and print the last combination column D in column E
Can anybody help
PP