Viewing 15 posts - 841 through 855 (of 1,494 total)
Steve Jones - Editor (8/23/2010)
August 23, 2010 at 11:37 am
Steve Jones - Editor (8/23/2010)
This has nothing to do with your permissions. The permissions must be granted for the service account running SQL Server.
Thanks for the reply.
Please could you explain...
August 23, 2010 at 11:09 am
You probably need to put the filters in the JOINs so that all the flights will show.
Something like:
SELECT [...]
FROM flights f,
LEFT JOIN person bs
ON f.bs_pilot = bs.number
LEFT JOIN person...
August 11, 2010 at 3:27 am
DENSE_RANK() OVER (PARTITION BY [AREAID] ORDER BY [BUILDINGID]) AS BUILDINGINDEX,
August 3, 2010 at 7:55 am
or you can use Application Locks with the procedure name as the resource.
July 28, 2010 at 9:41 am
You can use CASE but be VERY VERY careful.
You should check with the business what they want to happen when EXPECTEDDURATION is zero. It could be that there has been...
July 13, 2010 at 3:56 am
Also, I suspect you would be better having one SP for each module with all the SPs using static SQL.
July 13, 2010 at 3:19 am
Something like the following may help:
SELECT -- DISTINCT ?
vc.charge_id,
vc.service_item_id,
...
July 8, 2010 at 5:40 am
Or use the windowed functions:
To get your exact result:
-- *** Test Data ***
DECLARE @t TABLE
(
ID int NOT NULL
,ModelID int NOT NULL
,ClientId int NOT NULL
)
INSERT INTO @t
SELECT 1, 1, -1
UNION ALL...
July 7, 2010 at 10:34 am
1. A procedure has the settings for QUOTED_IDENTIFIER and ANSI_NULLS from when it is created.
(ie They need to be defined before creating the procedure.) I see no need for setting...
July 6, 2010 at 2:58 am
Try something like:
(SELECT COUNT(DISTINCT AcctNo) FROM @tmpTable WHERE AcctNo<= reg.AcctNo) AS RowNo,
June 25, 2010 at 9:07 am
or:
-- *** Test Data ***
DECLARE @A TABLE
(
AB_Id char(5) NOT NULL
,A_Code char(4) NOT NULL
,Unit varchar(10) NULL
,Line_Id int NOT NULL
,PK_Id int NOT NULL
)
INSERT INTO @A
SELECT 'FC002', '0041', '%', 1, 1
UNION ALL...
June 23, 2010 at 3:50 am
Maybe:
SELECT S.ClientNumber
,S.CaseNumber
,T.ReferralSourceType
,T.ReferralSourceDesc
FROM RequestForServices S
JOIN SourceOfReferral R
ON S.ReferralSource = R.ReferralSource
JOIN ReferralSourceTypes T
ON S.ReferralSourceType = T.ReferralSourceType
June 3, 2010 at 10:19 am
Or with the row difference method:
-- *** Test Data ***
DECLARE @t TABLE
(
ID int NOT NULL
,Data int NOT NULL
)
INSERT INTO @t
SELECT 1, 1
UNION ALL SELECT 2, 1
UNION ALL SELECT 3, 3
UNION...
May 25, 2010 at 10:51 am
Viewing 15 posts - 841 through 855 (of 1,494 total)