Script to disregard sql server null fields

Asked

Viewed 38 times

0

Hello, I have a table q has numerous columns (+ 80), I need a script to disregard the null fields and bring only those that have content.

I don’t want to use is not null, because it would list each column and are many.... Someone can help me??

  • 1

    You want it to bring a tuple of variable size to each row?

  • I wanted the select to bring only the columns with content (value)

  • 1

    It is not possible, the tuples need to be homogeneous

  • There would be no other way??

  • Not with tuples, not in relational algebra. Maybe in the application that consumes the query, but I don’t see the benefit

  • I need for a report I’ve been asked....

  • How is the client program that will generate the report?

  • I don’t see a solution for your case. Using NOT NULL would have to place for each column and still, many lines would not display. Are you sure that’s what they’re ordering?

  • First, never use SELECT *, so just choose the columns you want in the query... You are trying to solve a problem X of cause Y...

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.