Viewing 15 posts - 1,171 through 1,185 (of 7,608 total)
Sorry.
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[DelimitedSplit8K] (
@pString varchar(8000),
@pDelimiter char(1)
)
RETURNS TABLE WITH SCHEMABINDING
AS
/*SELECT *...
October 29, 2021 at 8:04 pm
A few other things need changed to match SQL Server syntax as well.
CREATE TABLE "circuits" (
"circuitId" int NOT NULL IDENTITY(1, 1), --<<--
"circuitRef" varchar(255)...
October 29, 2021 at 7:04 pm
Let's fall back on the old reliable dbo.DelimitedSplit8K function, to avoid doing all the parsing ourselves.
;WITH sample_data AS (
SELECT * FROM ( VALUES
...
October 29, 2021 at 6:56 pm
UPDATE ...
SET FirstName = PARSENAME(LEFT(EmailAddress, CHARINDEX('@', EmailAddress) - 1), 1),
LastName = PARSENAME(LEFT(EmailAddress, CHARINDEX('@', EmailAddress) - 1), 2)
October 28, 2021 at 2:49 pm
Yes to the most RAM you can get and actually use for SQL Server: 128GB for Standard Edition, as much as you can afford for Enterprise.
Note that, if Standard Ed,...
October 27, 2021 at 7:56 pm
You can write them to a table -- add an identity for ordering -- and then SELECT from that table, for example:
SELECT sql_text AS [--sql_to_run]
FROM #some_table_name
ORDER BY $IDENTITY
October 27, 2021 at 6:54 pm
You didn't say what the result should be if it is tied, for example, 2F and 2M? In that case, I went with 'FemaleMix', adjust that if you need to.
October 27, 2021 at 6:14 pm
You need to change the Options..., Query Results, SQL Server in your SSMS to display more chars.
You don't need (nor likely want) to toggle to text. A grid display should...
October 27, 2021 at 6:04 pm
My first suggestion would be to use SELECT rather than PRINT, since SELECT goes up to 65535 chars (I believe, if you have the options set that way in SSMS).
October 27, 2021 at 2:29 pm
SELECT [File Name], [Created Date], MAX([File sending Date] AS [File sending Date]
FROM <your_table_name>
GROUP BY [File Name], [Created Date]
October 26, 2021 at 3:37 pm
I don't think you need PIVOT at all in this case, unless I'm not understanding correctly:
SELECT Skill, COUNT(call_id) AS counts
FROM [a2wh].[dbo].[vw_CallLogCommon_2021]
WHERE date = '2021-10-10'
GROUP BY Skill
ORDER...
October 26, 2021 at 3:35 pm
Am I wrong saying that immediatelly after the full backup, the transaction log is useless?
Yes, that is quite wrong.
The transaction log would still be needed to recover to a point-in-time...
October 25, 2021 at 9:35 pm
To review, the table definition provided by the OP
CREATE TABLE dbo.IntChange (NumericValue INT)
INSERT INTO dbo.IntChange
VALUES (15697)
,(876)
,(1452)
,(3374)
,(894)
,(84516)
You have some reason to believe the future universe of possible...
October 25, 2021 at 8:50 pm
Wow all that. Ok maybe something like this
select IcC.NumericValue,
stuff((select ''+v.repl
...
October 25, 2021 at 6:33 pm
I try not to mastermind someone else's needs for code. If they confirm it's ssns or something else critical, then that needs to change. Nothing about the ssn should be...
October 25, 2021 at 6:20 pm
Viewing 15 posts - 1,171 through 1,185 (of 7,608 total)