Viewing 15 posts - 1,201 through 1,215 (of 13,855 total)
Something like this should do it:
SELECT CONCAT('USE ', u.DBName, '; ALTER ROLE [db_owner] DROP MEMBER [', u.Username, '];')
FROM @USER_table u
WHERE u.Username = 'Frodo'
ORDER BY u.DBName; September 2, 2022 at 10:51 am
I'm not sure I am convinced. How do you manage version control for the database objects which are being generated? Doing this means that you lose many of the consistency...
September 2, 2022 at 7:50 am
Agreed, which is why it should be stored as two separate fields. Could do it on the table with a couple of computed columns.
Or do it the way I...
September 1, 2022 at 7:55 am
Please read this article for details showing how to post sample data.
August 31, 2022 at 7:26 am
If you are hoping for a coded solution, please provide some sample data in the form of consumable CREATE TABLE and INSERT statements, along with desired results based on that...
August 30, 2022 at 6:30 pm
WHERE ROOM_NUMBER <500 or ROOM_NUMBER >= 600
perhaps? If it's an INT. If it's a string, you could do something like this:
WHERE ROOM_NUMBER NOT LIKE '5%'
August 30, 2022 at 6:25 pm
Yes, conn managers should be checked in with dev / local connections and that is how they should remain, as far as source control is concerned.
After deploying packages to QA...
August 29, 2022 at 4:13 pm
This line looks weird. What is it supposed to do? Strings and INTs mixed in the same list?
where o.status dbo.in ('D',1,2,3,4,5) August 29, 2022 at 1:45 pm
Righto. Have you considered creating a post like this?
"I am trying to import some XML files into SQL Server tables, but I am not sure how best to...
August 29, 2022 at 7:11 am
Ok and what about Python? I heard somewhere that it can also be used as an alternative of SSIS tasks?
Yes it can... so can C#, Visual Basic,...
August 29, 2022 at 6:51 am
Ok and what about Python? I heard somewhere that it can also be used as an alternative of SSIS tasks?
Yes it can... so can C#, Visual Basic,...
August 29, 2022 at 6:51 am
What sort of feedback are you expecting? If someone here says 'Yep, looks good', does that mean you will push the code to Production?
And when there's a problem, you'll be...
August 28, 2022 at 7:01 am
Jeff, that's nice work. Thanks for reminding me of ROLLUP and GROUPING too.
August 27, 2022 at 10:55 am
There is no syntax error in that code. I just copy/pasted and ran it to be sure that the rendering had not affected anything.
Which version of SQL Server are you...
August 26, 2022 at 4:10 pm
Please post a question only once. Answers here please.
August 26, 2022 at 3:33 pm
Viewing 15 posts - 1,201 through 1,215 (of 13,855 total)