Hi All Is it possible to restrict the feilds returned from a select statement which means i want to see only the feilds in a record which has some data in them and want to ignore the other feilds where feild is null and i dont know in advance which feilds are null and that is the reason i cannot have it in the where condition
so for example Select * from table_name where column1 =''xxx' returns 1 record with 15 feilds which is the number of feilds existing in the table.
if for example there are 3 feilds where the data in those feilds is null i do not want them to be returned in my select query
I assume you mean that if the data in every row for a given column is null, then you don't want that row to be included in the result set. To do that, you would have to write a dynamic query.
If you describe the reason for wanting it that way, may be people would be able to suggest alternatives. To me at least, the unpredictability of the columns returned based on the variations in data makes it hard to process the result set. So I am not able to imagine what your reason for wanting that might be.
Iam trying to compare two requests(records) one request from previous year(2012) and 1 request from current year(2013) and want o capture only the feilds from the two records where there is a change in data and ignore/hide all the other feilds where data has remained the same