Seeking SQL tip(s) for getting customer_no query results into a list (only if it's an efficiency improvement over copying over to csv and importing).
Thanks,
John
Have I got an answer for you!
Four years ago I built a little set of stored procedures for this and demoed them in a Mini-Magic at TLCC. The code project is available in the community code repo:
https://bitbucket.org/TN_WebShare/dba-list-utilities
It gives you a dbo.LP_LIST_FROM_QUERY procedure that accepts a dynamic SQL query and a bunch of optional parameters, for example:
EXEC dbo.LP_LIST_FROM_QUERY 'SELECT customer_no FROM T_CUSTOMER WHERE inactive = 2', 'Inactive custs';
Other examples are listed in the readme. As a reminder, if you don't have access to the Bitbucket repo, you can get access by submitting the form at https://www.tessituranetwork.com/Support/Start/Developers/Access (or emailing webmaster@tessituranetwork.com).
There is also always the "Show Query" option for a manual edit list right there in Tessitura. But obviously that only works for queries that can be simply written in a single SELECT statement. For more complex needs, the solution Nick mentioned is better. But if you can manage to get it into a simple list, it does work well for beating the CSV/import option.
Great! TY. I would've found if I'd put underscores between my search terms.
John, I could do that, so they made me a DBA (just a word of warning to anyone thinking about going down this path).
You and me both. But there are worse things.