Viewing 15 posts - 421 through 435 (of 7,187 total)
I hope your assertion that most triggers are single-row triggers is incorrect, although it certainly does appear to be a mistake that a lot of developers make!
Something like this should...
October 14, 2019 at 1:10 pm
Why do you want to avoid using a case expression? Why are you not allowed to share the script?
Seriously, if you're asking for help with what appears to be a...
October 14, 2019 at 9:43 am
Debugging dumps is advanced stuff. I'd raise a call with Microsoft, if I were you. They're likely to be able to pinpoint the cause much faster than you can.
John
October 14, 2019 at 9:35 am
Yes. You can use dynamic SQL. Make sure you understand what SQL injection is and how to prevent it before you play with this.
DECLARE @DBName sysname;
DECLARE @SQL...
October 14, 2019 at 8:50 am
Mark
You're welcome. You should consider Luis's or Des's variations as well - I think they're right not to fiddle about with temp tables. My solution was cobbled together in five...
October 14, 2019 at 8:02 am
Something like this?
CREATE TABLE #MedalMetals (Metal varchar(25), MedalRank int);
INSERT INTO #MedalMetals
VALUES
('Performance Standard', 1),
('Bronze', 2),
('Silver', 3),
('Gold', 4);
DECLARE @PP_Medal varchar(25) = 'Bronze';
DECLARE @SU_Medal varchar(25) = 'Silver';
DECLARE @QAS_Medal varchar(25) =...
October 11, 2019 at 4:02 pm
Maybe the logging needs to be more detailed? It's been a while since I've used SSIS, so I can't remember how you do that. Also, if it's only happening intermittently,...
October 11, 2019 at 1:03 pm
Unfortunately, you can't create a synonym for a schema, only for individual objects. The reason you didn't get an error when you created the synonym is that the name...
October 11, 2019 at 10:46 am
Sounds as if you have a permission on something that the SQL Server Agent account doesn't. Do you have any logging set up in your package?
John
October 11, 2019 at 10:26 am
It's a poorly worded question. I can think of two reasons why the statement could be construed as being wrong:
(1) It's the rows that are stored in sorted order, not...
October 11, 2019 at 9:55 am
To answer your original question, sa has permission to do everything in SQL Server (if anyone knows something it can't do, please don't flame me). Best practice is to rename...
October 4, 2019 at 3:19 pm
Do you yourself have privileged access to the server? If not, you won't be able to see the sa login, even if it exists. As far as I know, the...
October 4, 2019 at 3:02 pm
You should declare your table variable outside of the WHILE loop, otherwise it will keep getting reinitialized.
Phil, I agree that the table should be declared outside of the loop,...
October 4, 2019 at 2:14 pm
Doing this from memory, so if it's not quite correct then feel free to tweak it.
SELECT 'RESTORE LOG <MyDB> FROM DISK = ''' + f.physical_device_name + '''...
October 4, 2019 at 1:39 pm
Yes, it's possible. Do you have any reason for suspecting that it isn't?
John
October 3, 2019 at 11:25 am
Viewing 15 posts - 421 through 435 (of 7,187 total)