Viewing 15 posts - 3,706 through 3,720 (of 5,111 total)
When you have to set...
May 17, 2017 at 5:41 am
May 17, 2017 at 3:22 am
To save others time:CREATE TABLE #Sample
(RowID int,
[Date] date,
[Value] int,
NextValue int,
InSequence int);
GO
INSERT...
May 17, 2017 at 3:21 am
The query is going to be pretty "simple", going with an inner join is the right way to go. You're probably looking at a query something along the lines of:
May 17, 2017 at 2:07 am
This might get you started, but without knowing your end game, I have no idea what to aim for:SELECT X.N.value('@label','nvarchar(50)') AS [Type],
C.T.value('@label','nvarchar(50)') AS...
May 16, 2017 at 3:50 pm
What you seem to be talking about there is more ofa data warehouse point of view, rather than a how you would store "normal" data. Data warehouses and "normal" data...
May 16, 2017 at 3:20 pm
That's because dates are technically stored as numbers ,a value of 0 is 1900-01-01, 1 is 1900-01-02. Having a value of 20170516 would be 20,170,516 days after 1900-01-01. Considering that...
May 16, 2017 at 2:49 pm
Unfortunately, the int type isn't really designed to be used as a date field. When you do, you end up having problems with this. Personally, I would add a column...
May 16, 2017 at 12:51 pm
Without seeing the full original data, this is a guess, but I would imagine the problem is your first CASE statement, not your second, with regards to the expression:
May 16, 2017 at 9:54 am
Firstly, I'm actually a little more concerned about your WHERE statement of:CONVERT(VARCHAR, GETDATE()-1, 101)
Why are you converting your date to a varchar? Is your field ompOrderDate also a...
May 16, 2017 at 8:28 am
What are you trying to achieve here? The reason you're getting 3 rows is because there are 3 rows of data.
You have a GROUP BY in your query...
May 16, 2017 at 6:58 am
As Grant explained, you can't shrink a database without first deleting data. If all of your data is "required" (perhaps for audit, historic purposes) then you have little or no...
May 16, 2017 at 5:57 am
Eating too much spam is not good for you.
May 16, 2017 at 5:20 am
SQL already runs top down already, so I'm not sure what your point is here. If you have 3 SP's, each one will be executed in a top down order....
May 16, 2017 at 3:58 am
May 16, 2017 at 2:05 am
Viewing 15 posts - 3,706 through 3,720 (of 5,111 total)