Viewing 15 posts - 796 through 810 (of 3,489 total)
Wow. I'm way to lazy to write all that.
Setup:
use tempdb;
go
Create Table Vendor (
VendorId BIGINT IDENTITY(1,1) NOT NULL
, VendorName varchar(256)
);
Create Table Visits (
VisitID BIGINT IDENTITY(1,1) NOT NULL
, VendorId...
February 22, 2020 at 1:31 am
What's the structure of tmpDeal01? And where does it get its data? There's not enough detail here to figure out the problem, I don't think. Got some sample data -...
February 21, 2020 at 10:21 pm
Could you clarify what this means "I have written a query, but its not working as desired."? What is the output you got and what was the output you expected?
How...
February 21, 2020 at 8:42 pm
Don't think you can use UNPIVOT then either. Not sure if this will work, because 2019 doesn't allow a compatibility level to 2005. Maybe this works?
SELECT AccountID
,...
February 20, 2020 at 3:52 pm
2019.
You can change the compatibility level if you want to, though.
February 20, 2020 at 7:33 am
Why not create a Total Sales measure, and then reuse it?
[Total Sales] := SUM(Sales[ExtendedAmount])
[PM Sales] := CALCULATE ( [Sales], DATEADD(DimDate[FullDateAlternateKey],-1,MONTH) )
Then growth is just
[Total...
February 19, 2020 at 8:34 am
Go into the Calendar/Dates table, and select the CalendarMonth column. Then in the ribbon, click on "Sort By Column" and select MonthNumber
February 18, 2020 at 10:35 pm
If you download the AdventureWorks database and the Data Warehouse version, you'll see the difference. They're very different. I'm sure there are tutorials all over the place, but the purpose...
February 18, 2020 at 9:05 pm
Grant Fritchey has a bunch of videos on YouTube where he shows you how to do a bunch of database backup & restore things. Definitely worth watching.
February 18, 2020 at 7:58 pm
Wait wait wait...
you can only reference a CTE immediately following the declaration. Why do you need a CTE for this at all? What are you trying to accomplish?
February 18, 2020 at 5:39 am
Select @localvariable = count(*) from server_cte
February 18, 2020 at 4:55 am
SELECT ServerName + ', ' AS 'data()'
FROM ServerList
FOR XML PATH('');
February 17, 2020 at 6:14 am
Mike... most of the answer that I found is right here...
DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358...
February 16, 2020 at 2:24 am
That's an awful lot of points for someone who can't even post consumable data. I guess this is required reading then: Forum Etiquette: How to post data/code on a...
February 16, 2020 at 2:00 am
Sorry, missed the NVARCHAR. (The answer is in the same article, though!)
February 15, 2020 at 8:09 pm
Viewing 15 posts - 796 through 810 (of 3,489 total)