Viewing 15 posts - 61 through 75 (of 82 total)
SELECT ProsAtty, (SELECT COUNT(1) from DefendantEventPros
where EventDate Between '7/1/2006' And '7/12/2006'
and EventID = 2
and VBKey = DC.VBKey) AS CountOfProsAtty
FROM DefendantCase DC
WHERE DC.StatusID IN (1,17)
and ProsAtty IN (55,52,27,57,3,50,4,2,54,63,88)
Naga-
July 12, 2006 at 10:28 am
select jan_amt, feb_amt, mar_amt, Qtr1_amt,
apr_amt, may_amt, jun_amt, Qt2_amt,
Half_Year_amt
FROM (
Select jan_amt, feb_amt, mar_amt, jan_amt+feb_amt+mar_amt as qtr1_amt,
...
July 7, 2006 at 1:15 pm
Hi
You can use a derived table to get rid off the long IN clause.
Use http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=850 function as derived table and pass your in clause elements to this function...
July 6, 2006 at 2:24 pm
dbcc useroptions and lookfor SetOption = 'isolation level'
June 29, 2006 at 2:54 pm
Information_schema views are private to a database instead you can use sys.columns view
June 28, 2006 at 10:20 am
SQL Server will not support using DML statements inside UDF
June 28, 2006 at 10:16 am
drop and recreate the linked server and try to run the proc again.
June 28, 2006 at 10:14 am
No need to recompile your stored procedure. The SP in any version of SQL Server will return an error. Please check your SP again OR send exact code.
June 28, 2006 at 10:10 am
Hi
Hope this works for you...
set nocount on
declare @TimeSheet table
(
TimesheetID INT,
EmployeeIDINT,
TimeSheetdate Datetime
)
INSERT INTO @TimeSheet values (1, 1, '08/06/2006')
INSERT INTO @TimeSheet values (2, 1, '08/06/2006')
declare @TimeSheetItem table
(
TimesheetItemID INT,
TimesheetIDINT,
Description VARCHAR(50)
)
INSERT...
June 15, 2006 at 11:47 am
Hi
You can use a derived table to get rid off the long IN clause.
Use http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=850 function as derived table and pass your in clause elements to this...
June 15, 2006 at 10:50 am
Here is another solution with RANK() fn, introduced in SQL Server 2005.
declare @t table (prog varchar(8), cost int)
insert @t
select 'Prog-A', 15000 union all
select 'Prog-B' ,16000 union all
select 'Prog-C', 21000 union...
June 6, 2006 at 9:39 am
1. create the fulltext catalog on your table
2. then create fulltext index on Keyword column
3. Use Contrains or Containstable function to get the desired results.
June 5, 2006 at 10:25 am
declare @Table table
(
InspectionIDINT IDENTITY(1,1),
SerialNoINT,
[Value]INT,
InspectionDateDATETIME DEFAULT GETDATE()
)
INSERT INTO @TABLE (SerialNo, [Value] )
VALUES ( 1, 21)
INSERT INTO @TABLE (SerialNo, [Value], iNSPECTIONdATE)
VALUES ( 1, 23, gETDATE()+1)
INSERT INTO @TABLE (SerialNo, [Value], iNSPECTIONdATE)
VALUES (...
June 5, 2006 at 9:54 am
You can use
select * from Split('memememe::kjsdfkjfds::ksjf::iuhsaf
sdffsd::safsdf
sdffs::sdfsdf:11231231::safdsfds::sdffssdf::sdfs
sdfsdffsdfsdf::sdfsdf::sfsdf::sdfsdf::sadfdssfds
dsffsfdfsdfsfdsfddf::sdfsfsfdfdssd::sdfsddfsdf','::')
http://www.sqlservercentral.com/memberservices/updatescript.asp?Approve=y&scriptid=850
June 2, 2006 at 9:58 am
Viewing 15 posts - 61 through 75 (of 82 total)