Viewing 15 posts - 31 through 45 (of 1,435 total)
A TVP is a table variable. Variables do not have any statistics. Historically SQL always assumed that a table variable contained exactly 1 record. In SQL 2019, this was changed...
June 20, 2024 at 2:35 am
To create sample data for people to assist you with ...
CREATE TABLE #TsetData (RBDCTL int, RBDTTC int, RBDTYR int);
INSERT INTO #TsetData ( RBDCTL, RBDTTC, RBDTYR )
VALUES...
April 11, 2024 at 2:35 pm
OK, try it as a basic aggregate
SELECT RBDCTL
, RBDTTC
...
April 11, 2024 at 2:33 pm
Try using a window function
SELECT RBDCTL
, RBDTTC
, MaxYear...
April 11, 2024 at 2:06 pm
Since you have not provided an expected output, hopefully this will get you started
DECLARE @RefTable table (
ID ...
April 11, 2024 at 10:15 am
I use the following script to search for dependencies
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
DECLARE
@ObjectSchema SYSNAME = '' /* You can limit the...
February 26, 2024 at 8:16 am
...To make matters worse, sometimes the tablet simply does not work. It just sits there with a "loading profile" message. Sometimes the best solution is not an IT solution.
It...
February 22, 2024 at 2:39 pm
I tried Charindex (Name: ) and Charindex(Sal:) then seond - one but no luck yet 🙁
Please help me. Thank you
CharIndex only uses a single character. For a...
February 1, 2024 at 6:35 am
Something like this
CREATE TABLE #MyTable (ID int, DATA NVARCHAR(MAX))
INSERT INTO #MyTable values (1, 'ID:12345, Name: Chris , Tiger, Sal:3000, City: NYC')
...
January 31, 2024 at 9:09 am
I tried Charindex (Name: ) and Charindex(Sal:) then seond - one but no luck yet 🙁
Please help me. Thank you
CharIndex only uses a single character.
For a group of characters,...
January 31, 2024 at 8:54 am
Rather have your UI pass the CustomerID from it's own context when passing the note to be saved. Shredding free text is expensive and will definitely come back to bite...
January 30, 2024 at 12:38 pm
I also put something like that together where it would look like this
where ([definition] like '%INTO [tableName]%' or ([definition] like '%update [tableName]%')
That got me the closest...
January 24, 2024 at 8:27 am
My previous answer does not cater for scenarios where ALL Name values are "NONE".
Updated code - Please test thoroughly.
WITH cteBase AS (
SELECT p.PatID, x.pos, x.Namex
...
December 21, 2023 at 8:13 am
For more info on using the CROSS APPLY method, please read this article
https://www.sqlservercentral.com/articles/an-alternative-better-method-to-unpivot-sql-spackle
December 21, 2023 at 8:01 am
Viewing 15 posts - 31 through 45 (of 1,435 total)