Viewing 15 posts - 16 through 30 (of 1,076 total)
I think writing summary queries in T-SQL is the wrong way to go if you're consuming the data in PowerBI. It's fine to create views using T-SQL to populate...
December 22, 2021 at 3:51 am
It really depends on whether you understand the consequences of NOLOCK. It can result in a 'dirty read' if there are uncomitted transactions in the database that affect...
December 22, 2021 at 3:45 am
Yes, agree that it would benefit in the read loads. But we should also consider the overhead of CI on write operations. So if the database is read-intensive then...
December 21, 2021 at 7:06 pm
If you have source control at your shop (like GIT) you may be able to see how other Jobs are scripted and pull out the block of code that defines...
December 21, 2021 at 6:46 pm
Does an estimated execution plan find any missing indexes?
To speed the query up you could try putting an index on the Customer table with the leading edge on columns...
December 21, 2021 at 6:41 pm
One example would be when you want to allow select to a 'tableA' from the accountingGroup. Then you realise that there is a member of that group who you would...
December 21, 2021 at 6:13 pm
I appreciate it is utterly trivial question, and yet... When you have a small amount of columns, there is a simple solution, sort of
INSERT INTO myTable
SELECT...
December 21, 2021 at 5:42 pm
Seems like this user is posting exam questions on the forum.
December 21, 2021 at 5:30 pm
This will illustrate what I was trying to point out initially
Try the following sample data and see results
Create table #myTemp(
area varchar(10),
store varchar(10),
totalStoreSales int
);
go
insert into #myTemp
values
('area_a', 'store1',...
December 21, 2021 at 9:03 am
SELECT DISTINCT [Name] FROM
Should not that be Select distinct @columnsList .... etc....?
I have a feeling you could make use of sp_executeSQL.
December 18, 2021 at 1:42 am
If you can post the whole message it would be of help. This could indicate your statistics are outdated. A bad estimation of rows could lead to a scan instead...
December 18, 2021 at 1:38 am
You are joining here the forcast on chain and location. Do you need to join on both conditions? In the visualisation tool there may be a setting to treat this...
December 18, 2021 at 1:16 am
It fails because the underlying table was created with ANSI_NULLS set to off.
December 18, 2021 at 1:03 am
Old post, but I ran into this issue recently.
I get an error when trying to create a 'filtered' non clustered index only. A non filtered variety works just fine. Seems...
December 17, 2021 at 5:12 am
This is an excellent diagram. I saved a copy as well.
December 8, 2021 at 11:08 pm
Viewing 15 posts - 16 through 30 (of 1,076 total)