Viewing 15 posts - 91 through 105 (of 2,610 total)
I uploaded your picture to ChatGPT 4 and asked it to: "Write a SQL Server create table (table name: XXXRE60P) and insert script for this, make sure you include all...
April 11, 2024 at 2:49 pm
;WITH CTE AS
(
SELECT DISTINCT
RBDCTL,
...
April 11, 2024 at 2:34 pm
Also try removing the last character from the string.
$dateTimeString = (Get-Date).ToString('yyyy-MM-dd HH:mm:ss')
$dateTimeString = $dateTimeString.Substring(0, $dateTimeString.Length - 1)
April 9, 2024 at 11:25 pm
Not sure if this will be any faster, you might have to look at putting indexes on the table if it is not:
;with cte as
(
...
April 8, 2024 at 9:50 pm
Not sure if this will be any faster, you might have to look at putting indexes on the table if it is not:
;with cte as
(
...
April 8, 2024 at 5:58 pm
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
Viewing 15 posts - 91 through 105 (of 2,610 total)