Viewing 15 posts - 226 through 240 (of 1,464 total)
OK, I tried
WITH (FIRSTROW=2, LASTROW=1000, FIELDTERMINATOR=',', ROWTERMINATOR='\r', FIELDQUOTE='quote_characters');
But got the following error
Invalid quote character specified for bulk load. Quote character can be one single byte or Unicode character.
If you...
January 6, 2022 at 3:35 pm
I have never worked with BULK INSERT, but maybe try adding
FIELDQUOTE = 'quote_characters'
January 6, 2022 at 3:23 pm
yes, it shows CRLF and I have tried changing it to both unix and mac using the EOL converter but no luck.
A shot in the dark here .....
January 6, 2022 at 3:11 pm
yes, it shows CRLF and I have tried changing it to both unix and mac using the EOL converter but no luck.
A shot in the dark here ..
Since you...
January 6, 2022 at 3:01 pm
The following code will achieve your requirement.
However, you may want to add code to prevent duplicates
INSERT INTO #t( id, name )
SELECT ISNULL((SELECT MAX(id) FROM #t),...
January 5, 2022 at 12:48 pm
Updating Phil's code, this will cater for the space in [Case ID]
CREATE TABLE #SomeXML ( TheData text NOT NULL );
INSERT #SomeXML ( TheData )
VALUES ( '<SB><Case...
January 5, 2022 at 10:52 am
In addition to the responses above, the following part of the WHERE clause will always result in a table/index scan
AND (@Session = 0 OR @session = SessionID)
That...
December 22, 2021 at 12:51 pm
i have rephrased the question
DECLARE @s-2 VARCHAR(MAX)= 'r1,r2' SELECT PATINDEX('%[^A-Za-z0-9-())![]]%',@s)
DECLARE @S1 VARCHAR(MAX)= 'X1;r2' SELECT PATINDEX('%[^A-Za-z0-9-())![]]%',@s1)
i need to get first text string before first comma or semicolan ex "r1" and "x1" respectivily...
December 21, 2021 at 7:31 am
DECLARE @ColumnList nvarchar(4000);
SET @ColumnList = STUFF( (SELECT N',' + ac.name
...
December 20, 2021 at 12:11 pm
Using LIKE %SomeVal% is always going to be slow as SQL has to do a table/index scan.
However, I have gotten pretty good performance using Trigram searches
https://sqlperformance.com/2017/09/sql-performance/sql-server-trigram-wildcard-search
December 18, 2021 at 8:22 am
You would probably get the best response directly from Brent Ozar
December 17, 2021 at 11:10 am
I suspect that the amount of time that you are experiencing is due to the time for the data to be shown on the screen, not the time for SQL...
November 30, 2021 at 3:29 pm
pgAdmin appears to be some sort of PostGreSQL tool
Perhaps yo would get better answers from a PostGreSQL forum.
November 29, 2021 at 3:22 pm
So, you are expecting the value to be truncated and not rounded.
Try this
DECLARE @id numeric(17, 2) = ROUND('123.456', 2, 1)
SELECT @id;
November 22, 2021 at 2:15 pm
Viewing 15 posts - 226 through 240 (of 1,464 total)