Viewing 15 posts - 166 through 180 (of 300 total)
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 p
cross 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
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 other...
February 18, 2022 at 5:11 pm
Using your own syntax, the query could be:
SELECT [VALUE]
FROM dbo.TABLE_1 t1
WHERE
IDMEASURE=(
SELECT max(IDMEASURE)
...
February 17, 2022 at 2:08 pm
You might also want to investigate the aggregate function STRING_AGG(), which should make what I think you want very easy.
https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql?view=sql-server-ver15
February 17, 2022 at 1:22 pm
Have you checked the scope of all the variables used? The right scope can have a big impact once you move to using containers.
If you have defined the same variable...
February 11, 2022 at 4:55 pm
Viewing 15 posts - 166 through 180 (of 300 total)