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,378
  • 3
  • 39
  • 99
Robin
  • 69
  • 1
  • 8

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,073
  • 146
  • 84
  • 117
JAYT
  • 11