Viewing 15 posts - 1,171 through 1,185 (of 2,645 total)
I would use a NOT EXISTS in some form
;WITH CTE AS
(
SELECT cs_subscription.cs_contactyominame AS 'Contact Name',
...
January 22, 2020 at 3:57 pm
Yeah, as you mention Jonathan, I could have multiplied from same table. Thats what i went on to do, but stupid as I am I then realised that I...
January 21, 2020 at 4:17 pm
Can't you multiply two matrices together from the same table?
I don't see why you need two different tables?
January 21, 2020 at 2:50 pm
Remarks
STRING_SPLIT inputs a string that has delimited substrings, and inputs one character to use as the delimiter or separator. STRING_SPLIT outputs a single-column table whose rows contain the substrings. The name...
January 20, 2020 at 11:04 pm
You need to speed up the statements that run after this stored procedure is called that are contained in the same transaction. Or, if you can, rearrange the calls to...
January 20, 2020 at 9:35 am
Could it be that the SP is called by long running processes (transactions) that are updating the same row (with the same [object_name]) and one of the transactions hasn't finished...
January 20, 2020 at 12:22 am
You could do it with a SQL Agent job and a call to DBMail.
January 19, 2020 at 12:09 am
;WITH cte AS
(
SELECT Revision_ID,
COUNT(*) CountParts
...
January 18, 2020 at 3:34 am
Another option is to use dynamic SQL. For any input parameters that are null the AND clause could be removed.
For example, if @PatientID were null you could remove this line...
January 16, 2020 at 8:34 pm
You could try one of the following hints at the end of the SQL:
OPTION (OPTIMIZE FOR UNKNOWN)
OPTION (RECOMPILE)
January 16, 2020 at 7:48 pm
Given that the table had no index at all, I didn't think in this case that making the clus index unique was necessary, particularly to the extent...
January 16, 2020 at 4:54 pm
Jonathan AC Roberts wrote:I think there are accounting standards that say 4 d.p. should be used for money calculations.
Well, that would depend on your country of operation, wouldn't it?
I don't know,...
January 16, 2020 at 3:37 pm
Well, the issue with MONEY is that who's to say monetary amounts should always have 4 decimals? Often it's too much, and sometimes it's not enough. And if you...
January 16, 2020 at 3:26 pm
To some extent, it gets worse with larger numbers. Try this:
DECLARE @tmp1 FLOAT = 10e27;
SELECT CONVERT(decimal(38,2),ROUND(@tmp1, 2)*100),
CONVERT(decimal(38,2),ROUND(@tmp1, 2))*100,
...
January 16, 2020 at 2:39 pm
Viewing 15 posts - 1,171 through 1,185 (of 2,645 total)