Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL Coding - need to show multiple values

$
0
0

Hello,

I'm having a Transact-SQL problem, I'm not sure if this is the right place but I don't really need syntax help rather working through the logic...

So, in our ERP system, we created a new table for Tax Exempt status on each customer in our database, which lists every single state as a checkbox so our CSR can select multiple tax exempt states, along with other options. So, when looking at it as a table, rather than having a "State" column, each and every state is its own column, populated with 0 or 1. Not ideal, but I'd rather not talk about that.

The problem is, for a report I'm trying to create a select statement with this one and our general customer table which lists the tax exempt state or states in one column. The headers for example would be "CustomerNo", "Address","TaxExemptState". They don't care if the customer and address...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>