0

I have a sql query which has 290 columns in SELECT statement. I need to apply a condition when any of the columns values is '' or only , then replace it with NULL across the columns... any help?

I can use case statement but writing 290 times does not serve the purpose... so any other alternative..

Vojtěch Dohnal
  • 7,867
  • 3
  • 43
  • 105
Robin
  • 87
  • 1
  • 12

1 Answers1

0

Better handle all your logic in your programming language. You can use this:

select  DECODE(<column name>, '', '1', '0') from <tablename>
Pang
  • 9,564
  • 146
  • 81
  • 122
JAYT
  • 11