How To Use The Select Statement To Display No Null Values
IAM A NEWBIE TO PL/SQL.i have created a table with 50 fields.in which i have inserted values in 5 fields.what i need is if iam going to select the record with some condidtion it should not display all the records only the fields with value should be displayed.
i have pasted my script.pls check out and tell me.
exit when a>10;
INSERT INTO CUSTOMER ("@id","Mnemonic","Gb Short Name","Gb Name 1","Gb Street","Sector") VALUES ("@id",Mnemonic,'ratheesh','name','anna nagar','1001');
pls help me out..
I would think you would have to define a collection, iterate through each column of each row to determine which columns are not null, then copy the relevant values into the collection.
The more important question though is 'why'? I tend to think that your data model needs some work if you are attempting to do this.
Also, you're going to regret those column names and the need to wrap them in double quotes everytime you reference them.
i agree with the others.. first, tell us why you want no nulls? nulls are very important.. its like saying "I only want to breathe oxygen, i dont have any use for the 78% nitrogen in the air that I breathe, can someone tell me how you remove it, so I dont have to breathe it?"
Click Here to Expand Forum to Full Width