Viewing 15 posts - 106 through 120 (of 2,620 total)
I think I fixed the issue. I added t_date to the partition part and now I am getting the correct number of records. The query is super slow though. ...
April 7, 2024 at 7:03 pm
Scott,
How do I add the tablename to this query? So it displays the tablename with the result of the max().
SET @sql_template = N'SELECT MAX([$column$]) AS [$column$],...
April 5, 2024 at 5:00 pm
concat_ws applies to SQL Server 2017 (14.x) and later
If you haven't got it on your database then use this instead:
concat(c.TABLE_CATALOG, '.', c.TABLE_SCHEMA, '.', c.TABLE_NAME)
April 5, 2024 at 2:36 pm
I think I will also need to add the table name to the result of the query.
DECLARE @TableString AS nvarchar(MAX)
DECLARE @SqlString as nvarchar(MAX) = ''
DECLARE MyCursor...
April 5, 2024 at 2:34 pm
DECLARE @TableString AS nvarchar(MAX)
DECLARE @SqlString as nvarchar(MAX) = ''
DECLARE MyCursor cursor
FOR SELECT concat_ws('.',c.TABLE_CATALOG, c.TABLE_SCHEMA, c.TABLE_NAME) x
FROM INFORMATION_SCHEMA.COLUMNS c
...
April 5, 2024 at 1:47 pm
Couldn't it be as straightforward as this??
SELECT t.[pick your columns]
FROM SomeTable t
INNER JOIN (SELECT [ID#]
...
April 3, 2024 at 11:11 pm
deleted - duplicate
April 3, 2024 at 12:20 pm
It sounds like an exciting opportunity for SQL Architects! With a focus on building sustainable systems, improving database architecture, and guiding engineering teams, this role is pivotal for the...
April 3, 2024 at 12:19 pm
This gives the exact same results as Jonathan's but only reads the near and next term data tables once each.
SELECT FP.UNDERLYING_SYMBOL,
...
April 2, 2024 at 6:49 pm
This gives the exact same results as Jonathan's but only reads the near and next term data tables once each.
SELECT FP.UNDERLYING_SYMBOL,
...
April 2, 2024 at 5:44 pm
Alternatively:
;WITH CTE AS
(
SELECT h1.hist_id,
'NEW' history,
...
April 2, 2024 at 4:45 pm
Thank you everyone.
This is very interesting. Is this a bug within SS that you cannot drop a #temp table inside a SP using the DROP TABLE command? Or is...
April 2, 2024 at 3:26 pm
Jonathan AC Roberts wrote:You need to add a
GO
before the second insert.and how will that work within a Stored Proc?
If the script is within a stored procedure it won't work,...
April 2, 2024 at 12:28 pm
You need to add a GO
before the second insert.
April 2, 2024 at 10:49 am
After reading again. I think this is what you want:
SELECT FP.UNDERLYING_SYMBOL,
FP.QUOTE_DATE ...
April 1, 2024 at 8:16 pm
Viewing 15 posts - 106 through 120 (of 2,620 total)