Viewing 15 posts - 76 through 90 (of 1,470 total)
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
Another option
WITH cteBase AS (
SELECT p.*, x.pos, x.Namex
, rn = ROW_NUMBER() OVER (PARTITION BY p.PatID ORDER BY...
December 21, 2023 at 7:57 am
Thanks DesNorton,
Inner join will give me ~40 odd GB used by various table. The intent is to find allocation units that are not part of actual usage hence the...
December 20, 2023 at 3:24 pm
I dont normally work with DB admin.
However, according to the example this page, your joins appear to be incorrect.
December 20, 2023 at 2:29 pm
On my SQL 2019 box, this def returns the default values.

December 20, 2023 at 11:28 am
The default values for parameters are not stored anywhere in the DMVs.
This statement is incorrect
SELECT ProcName = pr.name
, ParamName = p.name
...
December 20, 2023 at 7:19 am
As far as I understand it, SQL compiles the plan before it executes.
When you use a variable, SQL compiles a plan for an unknown value.
When you use a fixed value,...
December 20, 2023 at 6:48 am
Starting with SQL 2017, you can use the TRANSLATE function
November 28, 2023 at 7:52 am
You have to create a table to store it in
CREATE TABLE foo (col1, col2, etc)
Then insert the results into it
INSERT INTO foo (col1, col2,...
November 22, 2023 at 2:45 pm
Try the following
Add a computed column
ALTER TABLE C_B_PARTY_COMM
ADD emailDoman AS (CASE WHEN COMM_TYP_CD = 'EMAIL' THEN SUBSTRING(comm_val, CHARINDEX('@', comm_val) + 1, LEN(comm_val)) ELSE NULL END)...
November 22, 2023 at 2:40 pm
You can find a good splitter function here
http://www.sqlservercentral.com/articles/Tally+Table/72993/
Then you can apply it as follows to split, and rebuild in reverse order
DECLARE @TBL AS table ( COLUMN1 nvarchar(100));
INSERT...
November 10, 2023 at 10:53 am
Viewing 15 posts - 76 through 90 (of 1,470 total)