Viewing 15 posts - 7,831 through 7,845 (of 8,753 total)
Quick suggestions, you could use the UNICODE function, something like this
😎
USE tempdb;
GO
DECLARE @TEST_STR TABLE
(
TEST_STRING NVARCHAR(255) NOT NULL
);
INSERT INTO @TEST_STR(TEST_STRING)
VALUES
(N'MFY RLHH CSQÉ')
,(N'Aamj Gxmolwn Slf Yytrzgan Hiwd...
July 14, 2014 at 10:14 am
Quick question, what do you get from the following query?
😎
SELECT UNICODE(RIGHT([the string in question here],1))
July 14, 2014 at 5:06 am
Quick questions,
1. Can you provide some sample data?
2. How are you querying the staging tables?
3. What is your SQL Server Version?
😎
July 14, 2014 at 2:30 am
Quick thought, a solution might be replacing the group by with the over clause
😎
SELECT [BusinessEntityID],
[FirstName],
[MiddleName],
[LastName],
SUM([Quantity]) OVER (PARTITION BY [BusinessEntityID], [FirstName], [MiddleName], [LastName]) AS [SUMQuantity]
FROM [Person].[Person]
July 14, 2014 at 2:28 am
Ouch....of course my code is overly complicaded and will fail on 2K because of the values clause. More coffee...
😎
July 13, 2014 at 11:56 pm
GF (7/13/2014)
Thank you for your reply.I am using SQL 2000, sorry I did not mention that.
Thanks
Gary
Sorry about that, my bad and a typical BFC (Before First Coffee) syndrom:-P
😎
Here is a...
July 13, 2014 at 11:12 pm
This should get you passed the hurdle
😎
USE tempdb;
GO
DECLARE @Cars TABLE
(
Car_id INT IDENTITY(1,1) PRIMARY KEY CLUSTERED NOT NULL
,Description NVARCHAR(255) NULL
);
INSERT INTO @Cars(Description)
VALUES...
July 13, 2014 at 10:37 pm
For fun and to further on my previous post on simplifying nested string handling, here is another method which uses a pass-through parameter for sp_executesql.
😎
DECLARE @ONELL NVARCHAR(50) = N'O''Nell';
DECLARE @PARAM...
July 13, 2014 at 5:49 am
You can use an ExecuteSql task with a query that returns the date time string, here are two of quite few options.
😎
SELECT CONVERT(VARCHAR(32),GETDATE(),112)
...
July 13, 2014 at 5:07 am
Just throwing in my 2 cents here, some different looping and different type of cursors. Note that the STATIC cursor is the fastest of the lot.
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @SAMPLE_SIZE...
July 12, 2014 at 5:01 pm
Jeff Moden (7/10/2014)
Performance test code?
Firstly, apologies for the late response, slightly busy period:-D
I am not going to even bother with the code I posted earlier, it doesn't stand a chance;...
July 12, 2014 at 6:25 am
From what I can gather, there is no need for a cursor. It can change depending on the actual work required!
😎
USE tempdb;
GO
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES
...
July 12, 2014 at 4:00 am
Claudio Pinto (7/12/2014)
Thanks a lot Eirikur 🙂
You are welcome Claudio;-)
😎
You should anyway look into replacing the text data type, as according to MSDN "ntext , text, and image data types...
July 12, 2014 at 3:18 am
First a quick question, why use [text] data type? Better change that to a (n)varchar(max)!
Below is a quick example of the replace function (on varchar(max)), does not work on text.
😎
USE...
July 12, 2014 at 3:06 am
Just a quick thought on this problem; there is no need for any string manipulation.
😎
DROP TABLE #Sample
CREATE TABLE #Sample (Startdate DATE, [start-time] INT, [end-time] INT, duration INT)
INSERT INTO #Sample (Startdate,...
July 10, 2014 at 11:06 pm
Viewing 15 posts - 7,831 through 7,845 (of 8,753 total)