Viewing 15 posts - 16 through 30 (of 153 total)
All true, but it's equally true that you can turn a cross join into what is in reallity an inner join by moving the ON join criteria of an INNER...
April 12, 2022 at 10:19 am
The issue is that I need to select the MAX date when:
If the Max Date from my_column is equal to today's date, I need to select the Max Date...
April 12, 2022 at 9:14 am
Also worth mentioning is that you should (almost certainly) never use a DELETE on the whole table. TRUNCATE is much more efficient, and frees up the allocated resources + it...
April 5, 2022 at 8:33 pm
I would check the system stored procedure, i.e. msdb.dbo.sp_send_dbmail, to see if the sp has been modified to append a fixed mail address to any list of email addresses passed...
March 3, 2022 at 7:32 pm
I have to agree with Phil, your replies don't make much sense, and I am also on the verge of despair about you inablility to state your requirements in a...
February 28, 2022 at 12:10 pm
Download NAD in csv format, import it into a table, then select random entries from there?
February 25, 2022 at 2:47 pm
You have to re-throw the error from the catch section of the inner sp, so that it may be caught by the calling outer sp.
February 25, 2022 at 1:41 pm
How about this?
select distinct p.*from #proposal pcross apply ( select top(1) proposal_id from #proposal op where (op.change_ref =...
February 25, 2022 at 12:58 pm
Btw, the same can be achieved by utilizing TOP's big brother, the FETCH filtering:
WITH LastTwoDates AS ( SELECT DISTINCT ...
February 25, 2022 at 9:37 am
A slightly different approach:
WITH LastTwoDates AS ( SELECT DISTINCT TOP(2) LOGDATE FROM...
February 25, 2022 at 9:23 am
Maybe something like this?
WITH SinglesourcePartCompany AS ( SELECT GivenPartNumber_Non, vcompanyid FROM #notmappedsources GROUP BY GivenPartNumber_Non, vcompanyid...
February 23, 2022 at 11:04 pm
Okay, based on your query and your query output I have tried to guess some of your data and created some test tables (I have used declared table variables):
February 21, 2022 at 6:44 pm
There are of course several ways to do this, but since the format is pretty fixed, you could use this:
DECLARE @TestString VARCHAR(MAX) = N'B0AF47E9-E161-4EAD-A690-99C06E80A4B4_11, 441D9F5D-D4AA-416F-8F09-F70DE5D36644_12';With sp_data as...
February 21, 2022 at 4:58 pm
It would obviously be easier to offer help if you'd only provide some kind of test data for us to play around with, and the desired outcome for the test...
February 21, 2022 at 12:46 pm
Looks like you already have all the data connected. Now you only need to have the data presented in the right way. That task is for reporting tools or...
February 18, 2022 at 5:17 pm