Viewing 15 posts - 1,576 through 1,590 (of 7,614 total)
SELECT t1.ID, t1.Amount, t2.Amount_VLOOKUP
FROM table1 t1
CROSS APPLY (
SELECT CASE
WHEN t1.Amount < t2.col1 THEN 0
...
May 14, 2021 at 2:47 pm
UPDATE yt
SET name = LTRIM(RTRIM(name3))
FROM your_table yt
CROSS APPLY (
SELECT CASE WHEN yt.name LIKE 'ZZZZ%' THEN STUFF(yt.name, 1, 4, '') ELSE yt.name END AS...
May 14, 2021 at 2:45 pm
If the delete of the added user is an actual delete from a table, then use an after delete trigger to remove added users from the main row at the...
May 13, 2021 at 8:55 pm
For my databases, I've adopted the "If it moves, shoot it" philosophy for statistics updpates. In other words, if the RowModCntr is not zero and the stats haven't been...
May 12, 2021 at 8:49 pm
Hi
Thanks for your reply.
Does that mean that I need to run below grant execute SP SQL Script for each SP for user?
GRANT create procedure ON DATABASE::[db name] TO...
May 11, 2021 at 2:53 pm
Is there a way in the same SELECT statement to show different columns without using dynamic SQL?
No.
May 11, 2021 at 2:48 pm
Some of the amounts in the original didn't seem to add up, and the rules weren't specific for FTYPE and FCODE, but here's my best guess so far:
May 10, 2021 at 7:14 pm
I think a separate schema(s) is a valid approach. Indeed, it has some advantages. For one, the developer-created objects are in the db to which they apply. If you create...
May 10, 2021 at 4:00 pm
Very busy right now, as soon as I get time, I'll follow up on this ... unless, of course, someone else has already jumped in and solved it.
May 10, 2021 at 3:52 pm
Create the clustered index only before loading the table. Create the non-clustered indexes after loading the table.
If this is a permanent table, seriously consider using data compression. Although it takes...
May 10, 2021 at 3:49 pm
Yeah. I'm not sure why MS hasn't changed the SQL Server default value for that setting. They've made other adjustments to critical starting values, particularly for tempdb, but somehow haven't...
May 10, 2021 at 2:10 pm
So more logic changes requested by the client.
Similar query but luckily we now have a week indicator with extra columns and new paycodes that should be left out of...
May 9, 2021 at 7:54 am
I don't see a huge security issue with a separate schema. Thus, I don't see why this would necessarily fail an audit. That seems to be an overly broad claim.
I have...
May 8, 2021 at 5:57 am
I go the opposite way. In development / QA / etc. (i.e., not prod!), I give developers most permissions. The only thing I prevent -- when I'm allowed to --...
May 7, 2021 at 5:56 pm
The very best solution to overall performance, and to blocking/deadlocking, is to go back and get the best clustered index keys on every table. Hint: this will most often not, repeat...
May 6, 2021 at 9:52 pm
Viewing 15 posts - 1,576 through 1,590 (of 7,614 total)