Viewing 15 posts - 571 through 585 (of 3,500 total)
Because someone who shouldn't have had rights to execute his own SQL statements instead of being limited to existing, properly written stored procedures etc?
April 2, 2021 at 12:43 am
Pretty sure you can tell Steve is joking when he says "Power BI".
(That said, I guess that explains why there's no section here for it)...
April 1, 2021 at 11:59 pm
Forget about loops for a minute. What are you actually trying to accomplish? Please explain.
March 5, 2021 at 4:18 am
February 24, 2021 at 3:46 am
Okay, I'm super confused. If your data is already in a tabular model, don't you use DAX (or maybe MDX) to query it? If the issue is DAX, read Rob...
February 3, 2021 at 6:16 pm
So you create a statement on top of what you have and then get an average of the datediff results.
AFAIK, you'd have to roll your own median function. I'm sure...
January 26, 2021 at 6:15 am
Could you post some sample data and expected results?
I'd use a Calendar table for this kind of thing.
January 25, 2021 at 10:34 pm
As it wasn't my database, I would assume FIFO, but then I could be wrong. <g>
Frederico, any pointers on how to do it without a cursor? The only way I...
January 24, 2021 at 7:44 pm
Correct me if I'm wrong, but if I'm processing a series of work orders for products I need to build, then the only way to do it seems to be...
January 23, 2021 at 11:15 pm
This gets the "new" customers. Then you'd just join this back to the Transactions/Sales table and do a simple sum.
SELECT CustomerID
FROM Customer c
WHERE NOT EXISTS (SELECT 1
FROM...
January 20, 2021 at 2:25 am
Thanks... I think I'm going to read Itzik's book and watch some of Kendra Little's T-SQL courses on indexing and querying.
(Good time to have a normal job where people come...
January 18, 2021 at 8:56 pm
Like this?
SELECT ct.[NAME]
, SUM(ct.c_Imaging) AS Imaging
, SUM(ct.c_Long_Term) AS Long_Term
, SUM(ct.c_Factory) AS Factory
, SUM(ct.c_Central_Office) AS Central_Office
, SUM(ct.c_Pizza) AS Pizza
FROM
(SELECT ID
, [Name]
, CASE WHEN [Type] = 'Imaging' THEN [Count]...
January 13, 2021 at 2:07 am
I think you can grab the creation date of the file if you use a folder object and iterate over the files in PowerQuery. Then you could just remove the...
January 11, 2021 at 10:09 pm
Did you read this yet?
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns – SQLServerCentral
January 9, 2021 at 11:51 pm
You can insert the results of a stored procedure into a temporary table pretty easily
SELECT *
INTO #TempResult
FROM
(SELECT store, [week], xCount
FROM yt) AS sourceTable
PIVOT
(
SUM(xCount)
FOR [week] in ([1],[2],[3],[4],[5],[6])
)...
January 8, 2021 at 3:35 am
Viewing 15 posts - 571 through 585 (of 3,500 total)