Viewing 15 posts - 2,341 through 2,355 (of 13,874 total)
DROP TABLE IF EXISTS #Path;
CREATE TABLE #Path
(
FilePath VARCHAR(200) NOT NULL
);
INSERT #Path
(
FilePath
)
VALUES
('A:\AABCD\EDFG\RFG\MyDB123.bak')
,('A:\RFG\MyDB1123.bak')
,('A:\AABCD\EDFG\MyDB1223.bak');
SELECT p.FilePath
,LEFT(p.FilePath, CHARINDEX('MyDB',...
November 3, 2020 at 4:13 pm
November 2, 2020 at 3:58 pm
OK, now I understand why you wrote that.
Despite mention of the CS by the OP, my assumption was that this was a data flow containing multiple columns, one of which...
November 2, 2020 at 2:37 pm
Are there lots of different tables being changed? If so, the answer is likely to be one of
If only a handful of table are being modified,...
November 2, 2020 at 2:10 pm
I assume all you need it this:
LEN((DT_WSTR, 4) [Your Column]) == 4
If the values can also be longer than 4 characters as well increase the...
November 2, 2020 at 2:07 pm
I understand, but most SQL devs (including me) try to avoid triggers, as they can become difficult to manage, and sometimes have unexpected side effects.
The above is such a complicated...
October 30, 2020 at 6:38 pm
This sounds like business logic which should be handled in the stored proc which your front-end application calls when performing the INSERT.
October 30, 2020 at 6:17 pm
You get the original reply in the email. If the OP changes it, you don't see the change in another email.
Which is quite handy on those occasions where the...
October 29, 2020 at 9:38 pm
I am looking to see if there are any ways to improve the run time for select queries.
This was the request I responded to. The remainder of your post provides...
October 29, 2020 at 7:27 pm
Take a look in the Books section here too.
October 29, 2020 at 4:52 pm
SELECT * FROM TABLE can't really be optimised, as far as I am aware. It's a full table scan.
(Even though you want all the columns, you should still name them,...
October 29, 2020 at 4:49 pm
I suggest that you do it using this method (copied from https://sqlperformance.com/2020/09/locking/upsert-anti-pattern):
BEGIN TRANSACTION;
UPDATE dbo.t WITH (UPDLOCK, SERIALIZABLE) SET val = @val WHERE = @key;
...
October 28, 2020 at 5:28 pm
In the application they would select, from a drop down one of the symbols (<,>,=,!=). I figured I can assigning them letters or numbers, if it is number one...
October 27, 2020 at 8:59 pm
You'll have to use fully dynamic SQL to make this work.
Building arithmetic expressions like this is generally regarded as an anti-pattern in the T-SQL world. What is the underlying business...
October 27, 2020 at 7:45 pm
Viewing 15 posts - 2,341 through 2,355 (of 13,874 total)