Viewing 15 posts - 7,831 through 7,845 (of 8,760 total)
My preferred method would be
😎
SELECT DATEADD(HOUR,@hour,CONVERT(DATETIME,CAST(@date AS VARCHAR(8)),112))
July 15, 2014 at 2:04 am
Francis S. Mazeika (7/13/2014)
Each SQL instance has 3 distinct email profiles and each domain has its own mail...
July 15, 2014 at 2:00 am
marg 14154 (7/14/2014)
July 15, 2014 at 1:19 am
jumbojim22 (7/14/2014)
Consider a set of static data of which I want people to run their own queries against.
What methods might be available to prevent someone from either purposely (or...
July 15, 2014 at 1:13 am
fgrubercpa (7/14/2014)
I CAN DO
SELECT ST
FROM TABLE
and I get all of the ST...
July 15, 2014 at 1:10 am
My bad or rather a lack of tanker sized industrial strength coffee this morning, the RIGHT function isn't available in SQL Server 2000, sorry about the confusion here.
😎
July 14, 2014 at 1:50 pm
The answer depends, the default framing of a window function varies depending on the function. As an example, the first_value function has the default framing of rows between unbounded preceding...
July 14, 2014 at 1:43 pm
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
Viewing 15 posts - 7,831 through 7,845 (of 8,760 total)