Viewing 15 posts - 76 through 90 (of 430 total)
As it is in the 2022 forum there's always GENERATE_SERIES to come up with the Month numbers in the query. Assuming CustomerCode is not unique in the source table. I...
December 21, 2023 at 8:12 pm
I haven't explained very well - the second column isn't coming from another table
The second column is coming from a derived table. You could write a loop or use...
December 21, 2023 at 5:27 pm
Does this work?
SELECT a.CustomerCode,
b.MonthNum
FROM dbo.Customers AS A
CROSS JOIN (VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12)) AS b (MonthNum)
December 21, 2023 at 4:28 pm
second page
December 19, 2023 at 8:25 am
Looking at your first stored procedure you might be able to get what you need by selecting the top 1 row where employee_id = @employee_id and payroll_detail_id < @payroll_detail_id. If...
December 15, 2023 at 11:25 pm
I'm not sure which table you need to validate or whether an id can have multiple Field values. One solution might be to create a map table (this assumes table...
December 15, 2023 at 7:18 pm
Is this different from nested joins that allow an inner join to the right of a left outer? I recently came across this technique and was shocked that I had...
December 7, 2023 at 7:27 pm
Are you running a select query that returns millions of rows to your screen so you can look at them? if so, chances are that your pc is storing the...
December 7, 2023 at 4:29 pm
I cannot find the article referenced: "Writing SQL Server code with AI using GitHub Copilot" that is supposed to discuss how to install CoPilot. After installing per GitHub general...
December 5, 2023 at 10:22 pm
Put the zeros in quotes.
SELECT RIGHT('00000' + convert(varchar(5), CustID), 5) from my table
I thought CONCAT might work without quotes but it appears to convert 00000 to 0...
December 5, 2023 at 7:21 pm
What purpose is the identity column serving? Is it just there to be there? If so it is just adding overhead needlessly.
Ideally, move the clustered index to the identity...
December 4, 2023 at 6:24 pm
Hello,
Also location of measures is under the dimension. (images attached)
Any idea what could be wrong with the project setup ?
Thank you.
Have you looked at the Display Folder property of...
November 27, 2023 at 10:55 pm
I couldn't see the code until I quoted the post for reply, then my post was also hard to see. I pasted it in regular text as I couldnt make...
November 22, 2023 at 9:46 pm
duplicate
November 21, 2023 at 11:35 pm
Here's an example with an artificial column. I did try COUNT(ID), but it said invalid column.
DROP TABLE IF EXISTS dbo.Activities;
CREATE TABLE dbo.Activities
( ID INT,
...
November 21, 2023 at 11:32 pm
Viewing 15 posts - 76 through 90 (of 430 total)