Viewing 15 posts - 6,796 through 6,810 (of 10,143 total)
Try these two variants of your WHERE clause:
WHERE ([State] <> N'Closed'
AND Title LIKE N'%Bahamas%')
OR History LIKE N'%TheGreatCharlie%'
OR [Repro Steps] LIKE N'%Anything%'
WHERE [State] <> N'Closed' ...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 4, 2011 at 5:08 am
Vishal Singh (8/4/2011)
Not sure wwhatswrong with this query but whenever I am running this, I am getting all those rows with State='closed' which it should ignoring.
SELECT [ID],Priority,Title,[Created By],[Assigned To],...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 4, 2011 at 4:55 am
SELECT A.MSFTID,
SUM(COUNT(*)) OVER(PARTITION BY A.MSFTID) AS 'COUNT',
b.ULTIMATE_SUPER,
b.servicepackname,
A.name
FROM vwMY_VULNS A
LEFT JOIN MSSUPERMAP B
ON A.MSFTID = B.bulletinnumber
WHERE a.MSFTID LIKE '%MS%'
GROUP BY A.MSFTID, b.ULTIMATE_SUPER, b.servicepackname, A.name
ORDER BY...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 4, 2011 at 4:37 am
hxkresl (8/3/2011)
...How do i finish the merge statement so that it contains auto incremented number values in the 'schemamapping' column?..
Since 'schemamapping' is set to autoincrement, it shouldn't appear in the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 4, 2011 at 2:10 am
pwalter83 (8/3/2011)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2011 at 10:27 am
GSquared (8/3/2011)
ChrisM@Work (8/3/2011)
Recursive CTE's don't allow aggregate functions but they do allow ROW_NUMBER() which provides you with a means of obtaining MIN() and MAX():
It's probably going to be slower than...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2011 at 7:40 am
Recursive CTE's don't allow aggregate functions but they do allow ROW_NUMBER() which provides you with a means of obtaining MIN() and MAX():
http://www.sqlservercentral.com/Forums/FindPost1137945.aspx
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2011 at 2:30 am
-- make a sample table with some dates in it
DROP TABLE #Dates
CREATE TABLE #Dates (RandomDate DATETIME)
INSERT INTO #Dates (RandomDate)
SELECT Dateval = GETDATE() + n.RN
FROM (SELECT TOP 100 RN =...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 2, 2011 at 10:22 am
In full agreement with everybody who's posted so far - this is a lot of work, and you have a lot to learn. Here's a start - you need to...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 2, 2011 at 9:51 am
Nice work John, cheers 🙂
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 2, 2011 at 4:04 am
-- make some sample data
DROP TABLE #Test
CREATE TABLE #Test (MyString VARCHAR(30))
INSERT INTO #Test (MyString) SELECT 'IncomeTax'
INSERT INTO #Test (MyString) SELECT 'InheritanceTax'
INSERT INTO #Test (MyString) SELECT 'PurchaseTax'
INSERT INTO...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 2, 2011 at 3:33 am
Can you post the whole query? It should work:
drop table #test
create table #test (id int identity(1,1), guidcol uniqueidentifier)
insert into #test (guidcol) select NEWID()
insert into #test (guidcol) select NEWID()
insert into #test...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 1, 2011 at 6:51 am
Joy Smith San (7/29/2011)
...Problem is we can't create function or any other objects in client's DB. Have to manage with select query itself...
No problem.
SELECT d.MyKey, d.AppVersion, x1.*
FROM (
SELECT MyKey =...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 29, 2011 at 7:05 am
This shows some promise:
SELECT d.MyKey, d.AppVersion, x1.OrderSeq
FROM (
SELECT MyKey = 1, AppVersion = '10.1.55.3366'
UNION
SELECT 1, '10.1.99.64'
UNION
SELECT 1, '10.1.1.1'
UNION
SELECT 1, '10.1.3.9'
UNION
SELECT 3, '9999.9999.9999.9999'
UNION
SELECT 2, '7.0.4'
UNION
SELECT 2, '7.1'
UNION
SELECT 2, '8'
UNION
SELECT...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 29, 2011 at 6:13 am
SELECT TimesheetKey, SiteKey, [Date],
SUMDuration = SUM(Duration) OVER(PARTITION BY SiteKey, [Date], GroupRule), GroupRule
FROM #TIMESHEET
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 29, 2011 at 2:16 am
Viewing 15 posts - 6,796 through 6,810 (of 10,143 total)