Viewing 15 posts - 1 through 15 (of 455 total)
if OBJECT_ID('UTIL.index_definition','fn')is not null
drop function UTIL.index_definition
go
create function UTIL.index_definition
(
@schema sysname,
@table sysname,
@index sysname,
@include_on_storage bit = 1
)
returns varchar(max)
/*---------------------------------------------------------------------------------
select UTIL.index_definition
('dw', 'FactCompareResult','FCRBCKIdx',1 )
select UTIL.index_definition
('dw', 'FactCompareResult','FCRBCKIdx',0 )
Dynamic invocation:
set nocount on
print 'set nocount on'
select 'select UTIL.index_definition(''' +
s.name...
August 15, 2024 at 4:48 pm
Thanks a lot, Drew.
It works as expected.
April 2, 2024 at 6:58 pm
It's just a select from 3 tables, and 2 of them are with left join. For aggregations, I would have done it on SQL Server side. Now I am thinking...
December 29, 2023 at 2:04 pm
Thanks a lot Phil. It worked as expected.
I also have another problem. I need to filter some table with 2 conditions with AND, like in SQL Server it would be
WHERE...
November 20, 2023 at 10:02 pm
I ran $psversiontable in all 3 environments - ISE, VS Code, Command-line utility, and the version is all the same - 5.1.19041.2673
June 12, 2023 at 7:28 pm
Thanks you Thom, I found it in Tools/Options. It works great now!
Thanks again!
February 6, 2023 at 7:28 pm
Yes Thom, I am doing exactly that. Now I tried results to TEXT and it works fine. But the TEXT results when I execute the query, is running very slowly....
February 6, 2023 at 7:23 pm
Thanks a lot Johan. This is exactly what I was looking for.
October 18, 2022 at 3:07 pm
Thanks all for your replies.
Some of you are asking for full DDL and/or execution plan. Unfortunately, I cannot do that. At our place we have very strict rules about security...
September 13, 2022 at 6:40 pm
Thanks both Frederico and Johan. That works exactly as I wanted. Wanted to mark Johan's response as an answer too, but the site apparently does not allow it for two...
August 1, 2022 at 2:28 pm
Tried TRUNCATE - no errors. Tried DELETE - 0 rows affected.
But I probably found the reason, this is likely to be a cloned database, that was created with DBCC CLONEDATABASE....
June 7, 2021 at 10:31 pm
Ran it now. Did not help. Also tried DBCC checkdb. Did not help either. In an output message it displayed There are 0 rows in 0 pages for object <table_name>...
June 2, 2021 at 6:28 pm
All tables are in dbo schema. None of tables that I've checked so far with select count(*) have records.
June 2, 2021 at 4:49 pm
Thanks both Brian and Scott, but unfortunately nothing worked in my case.
@Brian: This query returns empty result set:
SELECT spid
FROM master..sysprocesses
WHERE spid > 50 AND dbid =...
May 18, 2021 at 1:20 pm
No. And frankly, I never worked with it. Can you please give more details of how I can use it?
Thanks
February 26, 2021 at 2:17 pm
Viewing 15 posts - 1 through 15 (of 455 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