Viewing 15 posts - 976 through 990 (of 3,480 total)
Is it possible to collapse some of the forums like you could on the old version of the website? Super handy to minimize the stuff I'm not currently interested in.
(I...
April 2, 2019 at 3:12 am
March 29, 2019 at 10:56 am
First, I can't really read your pictures. Second, I have no scenario or description of what's going on to compare it to, so sure, it's great. They both are. Knock...
March 28, 2019 at 10:45 pm
This will split the data:SELECT col, ds.ItemNumber, ds.Item
FROM #Table t
CROSS APPLY Utilities.dbo.DelimitedSplit8K(col,'-') ds
Then you would have to pivot it. This is most...
March 28, 2019 at 9:41 am
Do you mean like this?
SELECT *
FROM (
SELECT soh.CustomerID
, soh.OrderDate
, LAG(soh.OrderDate,1) OVER (PARTITION BY soh.CustomerID ORDER BY soh.OrderDate) AS PrevSale
FROM Sales.SalesOrderHeader soh
March 27, 2019 at 6:31 pm
You can sort inside the partition. (Using AdventureWorks2008R2)
SELECT soh.CustomerID
, soh.OrderDate
, LAG(soh.OrderDate,1) OVER (PARTITION BY soh.CustomerID ORDER BY soh.OrderDate) AS PrevSale
FROM Sales.SalesOrderHeader soh
ORDER...
March 27, 2019 at 5:21 pm
Then use LAG() and maybe ROW_NUMBER().
Any record with a non-null LAG() value will be a reopen.
March 27, 2019 at 4:24 pm
How far between open/close would count as a "reopen"? You can just use LAG() with a PARTITION to look backwards at the previous records.
March 27, 2019 at 4:08 pm
So when you created small, medium-sized, large, and ridiculously large TVPs and JSON files and queried them, what did the results look like?
March 23, 2019 at 2:50 pm
Why not set the collation to case-insensitive instead of doing all those converting to upper case? But without some sample data, and a sample of query parameter values, it's hard...
March 23, 2019 at 2:44 pm
"Consumable data" means CREATE TABLE and INSERT scripts that people here can copy & paste into SSMS to recreate your problem. If you don't do that, it's very likely you...
March 20, 2019 at 6:12 pm
Looks like this is the answer:
https://stackoverflow.com/questions/12676747/how-to-get-the-affected-rows-in-vba-ado-execute
March 20, 2019 at 3:41 pm
Luis,
I don't think that will work. That's why I did the weird REPLACE.
The Prod | 5 and Prod | 1 records split to separate records when they should...
March 20, 2019 at 9:19 am
Oh... maybe I figured out what Jonathan was talking about...SELECT id, [status], p2, REPLACE(ca.Item, '_',' ') AS NewItem
FROM
(SELECT id, [status], REPLACE(Products,' ','_') p2
FROM MyData
March 20, 2019 at 12:39 am
Yeah... I was having a fit trying to get the formatting etc to work. Does this site not like Edge? (Maybe I should just break down and use Chrome instead?)
March 19, 2019 at 2:18 pm
Viewing 15 posts - 976 through 990 (of 3,480 total)