Viewing 15 posts - 1,246 through 1,260 (of 2,648 total)
Hi..thanks so much. just one question, what does the x.c in the select statement mean to infer?
That's just the list of columns from the cross apply "x(C)", you can...
December 19, 2019 at 8:24 pm
So it's for staging tables on your database, not your application tables?
December 19, 2019 at 8:23 pm
SELECT CONCAT('
SELECT ',x.c, '
FROM ',QUOTENAME(t.TABLE_SCHEMA), '.', QUOTENAME(t.TABLE_NAME),'
GROUP BY ', x.c, '
HAVING COUNT(*) > 1;')
FROM INFORMATION_SCHEMA.TABLES t
CROSS APPLY (VALUES(STUFF((SELECT ',' + QUOTENAME(c.COLUMN_NAME)
... December 19, 2019 at 7:48 pm
Hi, I have a TVF that pulls column details from sys.tables so that it can produce some dynamic sql to generate a hashbyte.
This needs to be dynamic as it...
December 19, 2019 at 1:45 pm
Yes I agree, it is going to perform worse.
Wouldn't it be a hoot if the optimizer fooled everyone? That IS the nature of CTEs. No one will actually...
December 18, 2019 at 10:37 pm
An alternative solution
;WITH cte AS
(
SELECT s.Teams, s.Category, SUM(s.Sales) Sales
FROM dbo.Sales s
...
December 18, 2019 at 7:45 pm
An alternative solution
;WITH cte AS
(
SELECT s.Teams, s.Category, SUM(s.Sales) Sales
FROM dbo.Sales s
GROUP BY...
December 18, 2019 at 4:07 pm
There are CRM services that you only pay for how much you use and are accessed via a web-services, so there is nothing to install or write and you can...
December 17, 2019 at 12:23 pm
You have:
where d.SalesOrg_CustomerWS_ID = f.Retailing_Dealer_ID
in the WHERE clause which is comparing the left joined column d.SalesOrg_CustomerWS_ID to a column.
So it is the same as having an INNER...
December 16, 2019 at 5:15 pm
Is the scope of this work as follows?
December 16, 2019 at 4:10 pm
For your example you would be much better off, in terms of performance, by having an update followed by an insert:
UPDATE p
...
December 15, 2019 at 11:36 pm
For your example you would be much better off, in terms of performance, by having an update followed by an insert:
UPDATE p
SET p.rate...
December 15, 2019 at 8:54 pm
Have you looked at what objects are using the disk space or how much free space there is on the datafile?
If you right click on the database in the explorer...
December 12, 2019 at 11:27 pm
SELECT dest.TEXT AS [Query],
deqs.execution_count [Count],
deqs.last_execution_time AS [Time]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC
December 12, 2019 at 9:52 pm
Maybe some of those AND's should be OR's?
December 12, 2019 at 9:48 pm
Viewing 15 posts - 1,246 through 1,260 (of 2,648 total)