I have two table TableA and TableB for these tables data will be populated based on certain process (means TableA will be like temp table if value finialised then data will be moved to TableB)
based on that X condition I will select the value from TableA else from TableB
If X=10 condition
select col1,col2,col3,col4 from TableA
else
select col1,col2,col3,col4 from TableB
Both tables TableA and TableB will have same table structure,So here i dont want use the same code statement again in else by changing the table name alone.Is any other way that can be used without repeating the select statement again by changing the table.