mysql - SQL Query - Separating or batch excluding results based on a parameter -


so here's i'm trying accomplish.

from database pulling date, invoice#, customer name, state, , invoice total amount. within "invoice_details" table, i'm looking @ column called "description" entries keyword tax (via "%tax%"). each invoice may have several entries in 'description' column each item listed on invoice gets description.

for invoices charged sales tax: item added invoice tax charged. want query in way see if particular invoice# (or rowid in "invoice" table) has entry "%tax%", not return results invoice# (again, or rowid), including it's other lines of 'description' not relate tax charged.

in other words, searching description column entries, of multiple exist each invoice # - exclude entries of invoice# if 1 of 'description' entries contain "%tax%".


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -