Viewing 15 posts - 1,366 through 1,380 (of 1,435 total)
Grant Fritchey (10/11/2016)
If you're going to attempt to tune the query, you absolutely have to have the execution plans. There is no way you can...
October 11, 2016 at 7:19 am
Without visibility of your table structures, indexes, and actual query plans, it's difficult to look for the issues.
That said, that's quite a large query with a lot of UNIONs.
At a...
October 11, 2016 at 12:55 am
This should give you the results that you are looking for. However, if there are 2 countries in the same region with the same min population, then you will...
October 10, 2016 at 12:49 pm
The following partial solution is dependant on PatExclude8K available here ... http://www.sqlservercentral.com/scripts/T-SQL/117890/
If your data is "adres=molenweg 9a" then you will need to strip out the "adres=" first.
DECLARE @SourceTable TABLE...
October 4, 2016 at 8:52 am
DECLARE @tblStr VARCHAR(MAX);
DECLARE @intCtr INT;
SET @intCtr = 1;
WHILE @intCtr <= 6
BEGIN
SET @tblStr = '
IF OBJECT_ID(''[dbo].[SomeTable' + CONVERT(VARCHAR(5), @intCtr) + ']'', ''U'') IS NOT NULL
BEGIN
...
October 4, 2016 at 4:07 am
NineIron (10/3/2016)
I need to get a value for each week, ending with Friday, for the date range.
This is based on the RegistrationDate. You can modify it to work on...
October 3, 2016 at 9:54 am
DECLARE @today DATETIME = DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0); -- This is important to remove time from the equations
DECLARE @EndDate DATETIME = DATEADD(dd, -DATEPART(dw,...
October 3, 2016 at 7:29 am
Based on the data that you have supplied, the following SQL works
SELECT *
FROM #Test AS t
WHERE ISNUMERIC(ResultValue) = 1;
October 3, 2016 at 6:48 am
Eirikur Eiriksson (10/1/2016)
October 3, 2016 at 3:00 am
First set up your data
CREATE TABLE #Required (
KeyHD INT --PRIMARY KEY CLUSTERED
, CountInserted ...
September 30, 2016 at 10:34 pm
This code will dynamically
- add a suffix to each duplicated QuestionNo
- build SQL to pivot the data
UPDATE dbo.TestTable1
SET Identifier = upd.Identifier
FROM dbo.TestTable1 AS orig
INNER JOIN (
...
September 30, 2016 at 3:40 pm
1 - You have not provided a key that groups all of the data for a specific person. Although, from your pivot code, it appears that Period may be...
September 30, 2016 at 1:55 pm
SELECT *
FROM YourTable
WHERE 'False' IN (col1, col2, col3, col4, col5, col6, ... )
September 29, 2016 at 12:10 pm
valeryk2000 (9/27/2016)
CREATE TABLE [dbo].[Readmission_Table](
[ID] [float] NULL,
[ArrivalDateTime] [datetime] NULL
) ON [PRIMARY]
GO
INSERT [dbo].[Readmission_Table] ([ID], [ArrivalDateTime]) VALUES (10000683, CAST(0x0000A66801716A50 AS DateTime))
INSERT [dbo].[Readmission_Table] ([ID], [ArrivalDateTime]) VALUES (10000683, CAST(0x0000A66900B9AB40...
September 28, 2016 at 3:18 am
Viewing 15 posts - 1,366 through 1,380 (of 1,435 total)