Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Vinod
Creator
Creator

How to delete commom records

Hi All,

Table1 :

LOAD * INLINE [

    Year, Value

    2001, 100

    2002, 200

    2003, 300

    2004, 400

    2005, 500

    2006, 600

    2007, 700

    2008, 800

    2009, 900

    2010, 500

];

Table2 :

LOAD * INLINE [

    Year

    2001

    2010

    2005

    2006

    2007

] ;

Above I have created two table and in that two tables i want to delete common Year from both the table and I want output like below mentioned table.

Year

Value

2002

200

2003

300

2004

400

2008

800

2009

900

Please  anyone reply.

Regards,

Vinod

6 Replies
sunny_talwar

May be this

Table2:

LOAD * INLINE [

    Year

    2001

    2010

    2005

    2006

    2007

];


//Table1:

LOAD * INLINE [

    Year, Value

    2001, 100

    2002, 200

    2003, 300

    2004, 400

    2005, 500

    2006, 600

    2007, 700

    2008, 800

    2009, 900

    2010, 500

]

Where Not Exists(Year);


DROP Table Table2;

Anil_Babu_Samineni

May be this?

Table2 :

LOAD * INLINE [

    Year

    2001

    2010

    2005

    2006

    2007

];

Table1 :

LOAD * INLINE [

    Year, Value

    2001, 100

    2002, 200

    2003, 300

    2004, 400

    2005, 500

    2006, 600

    2007, 700

    2008, 800

    2009, 900

    2010, 500

] Where Not Exists(Year);

Drop Table Table2;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Vinod
Creator
Creator
Author

Ok Sir. Thank You. It's working.

Vinod
Creator
Creator
Author

It's working.Thank You Sir

qlikviewwizard
Master II
Master II

Please select Correct Answer and Close the thread.

nasirsaikh
Creator
Creator

Please select Correct Answer and Close the thread.