Viewing 15 posts - 16 through 30 (of 35 total)
Both solutions worked very well.
Would like to add additional criteria.
Create table tmpUserDetails
(
Userid int,
LocationIDint,
Activityvarchar(200),
OtherDatavarchar(200),
RowDatavarchar(200)
)
truncate table tmpUserDetails
insert into tmpUserDetails values (1,1,'Test','OD1','Row1-1')
insert into tmpUserDetails values (1,1,'Test1','OD1A','Row1-2')
insert into tmpUserDetails values (2,1,'Loc1','OD2','Row...
March 13, 2012 at 1:04 pm
Thanks for all the replies.
Following query solved my problem.
select b.UserID,b.ObjectID,b.cid,
(select count(*) from @tblexample b2 where b.UserID = b2.UserID and b.ObjectID = b2.ObjectID
and b2.StartDate < b.StartDate) as...
January 9, 2012 at 3:01 pm
The other question on the original posting, is why it would cause error, even when the insert scripts are inside the "If Object is null" block.
At the compilation time,...
September 14, 2011 at 7:49 am
Replace the insert scripts as below.
exec ('insert into testa([ID],[IdDes],[IsActive]) values(1,''One'',1)')
exec ('insert into testa([ID],[IdDes],[IsActive]) values(2,''two'',1)')
exec ('insert into testa([ID],[IdDes],[IsActive]) values(3,''three'',1)')
This worked.
September 13, 2011 at 10:10 am
Please ensure "SQL Server services" are running.
August 17, 2011 at 10:34 am
Nothing wrong with "If exists....drop...create" approach.
Instead of performing two actions being done prior to Create, I was wondering if it could be minimized to perform only One action (check if...
July 15, 2011 at 10:51 am
All the suggested solutions worked. Thanks.
June 24, 2011 at 10:13 am
Amazon CloudBerry Backup strategy seems to be one of the considerable solution for this situation.
More details on this article at
May 14, 2010 at 1:41 pm
"Like" and "IN" are two seperate operators.
Simplest approach is to use
select * from my table where filed like '%papper%'
or filed like '%pen%'
May 14, 2010 at 1:34 pm
The excel file is having tons of columns and I have multiple tabs.
Can I get more details on how to use DotNet assemblies to read this kind of excel file.
April 25, 2008 at 8:00 am
This code works perfectly.
Thank you very much for the solution...:)
April 18, 2008 at 11:13 am
This procedure works fine, as long the orderID have matching records in the orderdetails table.
Example 1:
exec p_Get_OrderSummary @ItemName = 'drums'
This gives the correct results.
OrderID | CustName |No.Items...
April 18, 2008 at 9:34 am
Create Procedure Usp_OrderDetails
(@ItemName varchar(20))
As
Select M.OrderID,M.CustName,(select count(OrderItemID) from OrderDetails where OrderDetails.Orderid=M.orderid),OrderDate
From OrderMaster M INNER JOIN (
Select Case When @ItemName IS NULL Then OrderMaster.OrderID Else D.OrderID End OrderID
From OrderMaster LEFT OUTER...
April 18, 2008 at 8:39 am
It would be "And". Assume if I have 10 searchable fields, and a search can be made on one field or a combination of fields.There is no gurantee, how many...
April 18, 2008 at 8:09 am
Viewing 15 posts - 16 through 30 (of 35 total)