Viewing 15 posts - 1 through 15 (of 37 total)
I like Azure Data Studio - a lot. I'm not looking forward to going back to SSMS for data development / exploration. Being able to use a sql client on...
February 16, 2025 at 1:57 am
I like Azure Data Studio - a lot. I'm not looking forward to going back to SSMS for data development / exploration. Being able to use a sql client on...
February 16, 2025 at 1:57 am
Thanks Steve Collins--I missed the "The larger query I have has many fields with converts etc. so I am trying not to add the CustomerId to the nested query to...
July 16, 2024 at 7:21 pm
I threw some data into temporary tables and came up with this:
SELECT customerID, SUM(TargetQty) , SUM(TargetQty) - (SELECT sum(targetqty) from #customerTotals t WHERE t.customerID <> c.customerID) TargetQtySubtractOthers, groupID, acctcD
FROM #customer...
July 16, 2024 at 5:07 pm
Please appreciate we are all volunteers here with our own jobs, hobbies, families, etc. This is a relatively complicated concept for someone new to sql. You may need to put...
December 14, 2023 at 8:07 pm
Ok, makes sense. I think you need to partition by employee_id:
drop table if exists #t
select 1 as payroll_detail_id, 1 as payroll_id, 1 as employee_id, 2 as...
December 14, 2023 at 5:53 pm
So for payroll id of 3 (employeeID 1 ) you want to get data from the record payroll_detail_id 1 ? Do you want to get all records for that employee...
December 14, 2023 at 5:21 pm
Will the lag window function help?
https://learn.microsoft.com/en-us/sql/t-sql/functions/lag-transact-sql?view=sql-server-ver16
December 14, 2023 at 5:01 pm
Hi, We figured out how we are going to handle this-- keep the StartDate / EndDate as a datetime and change the values to the beginning of the day meaning...
January 21, 2023 at 5:41 pm
Thanks for the response Steve Collins.
I wasn't clear in my question. We write the start date of the customer dimension record as a date time, in the example the StartDate...
January 17, 2023 at 10:26 pm
Thanks for the response Michael. There are many more attributes in our customer table than just sales rep id. The customer surrogate key s/b the only key in the fact...
January 17, 2023 at 9:10 pm
declare @text varchar(100) = 'Southeri,Brettuen'
select @text, Replace(@text, ',' ,', ')
April 20, 2022 at 2:58 am
You are welcome. I learned something, too, from Mark C’s solution
February 28, 2022 at 6:41 pm
Here is what I would do. There may be a different way--without having to "hardcode" every path--but I don't know of one.
DECLARE @doc XML
SET @doc =' ...
February 25, 2022 at 11:05 am
I'm not sure how much control you have over the xml, I reformatted it a bit and here is how I would do it:
declare @x xml =...
February 25, 2022 at 2:10 am
Viewing 15 posts - 1 through 15 (of 37 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy