Viewing 15 posts - 7,996 through 8,010 (of 15,381 total)
Glad that worked for you.
June 11, 2013 at 1:39 pm
Paresh Motiwala (6/11/2013)
It has 3 parameters.
1. to select people,
2. to select date.
3. is default(run date)
when...
June 11, 2013 at 1:33 pm
sqlfriends (6/11/2013)
Thanks, the two answers is just what I want.One more question, so for join inline table function we should always use cross apply, is that correct?
You should read this...
June 11, 2013 at 1:32 pm
So just like the example for BOL.
CREATE PROCEDURE [dbo].[pr_insertAgencyVendorInfo]
( @ClientName nvarchar(15),
@VendorName nvarchar(40),
@TaxID nchar(9),
@ActiveFrom datetime,
@ActiveTo datetime,
@ErrorMsg nvarchar(4000) OUTPUT)
as
begin try
insert into AgencySupplierPartner
(ClientName,VendorName,TaxID,ActiveFrom,ActiveTo)
VALUES
(@ClientName,@VendorName,@TaxID,@ActiveFrom,@ActiveTo)
end try
begin catch
SELECT @ErrorMsg = ERROR_MESSAGE()
end catch
The only difference here is...
June 11, 2013 at 12:27 pm
Something like this should work. This is untested because there is no sample data.
CREATE FUNCTION [dbo].[GetStreetApt] ( @StudentID INT )
RETURNS TABLE
RETURN SELECT CAST(ama.houseNumber AS...
June 11, 2013 at 12:20 pm
You should read up on how windowed functions work. You have PARTITION BY in your ROW_NUMBER.
insert #Tmp1
SELECT ROW_NUMBER() OVER (PARTITION BY ST.ParkingSpaceId ORDER BY StartTime) AS SN,
When you partition the...
June 11, 2013 at 12:06 pm
sdhamani1020 (6/11/2013)
Error :
Msg 1776, Level 16, State 0, Line 1
There are no primary or candidate keys in the referenced table 'tbl_property' that match the referencing column...
June 11, 2013 at 12:02 pm
homebrew01 (6/11/2013)
I don't really want to take on anything else right now, but may have to.
Back to my original question, would you expect that table to be locked...
June 11, 2013 at 11:02 am
Once I see named code blocks and GOTOs all over the place my eyes started bleeding.
I know that you inherited this so it won't offend you when I say this...
June 11, 2013 at 9:56 am
Annee (6/11/2013)
thanks.. but it's not very helpful.If someone can provide an exact sample, would appreciate it!
Not sure how much more simple it could be than the examples on that page.
begin...
June 11, 2013 at 9:42 am
Lynn Pettis (6/11/2013)
I also blame this on a lack of caffeine as I am staying away from it until I see my doctor this afternoon.
I hope everything is ok. Not...
June 11, 2013 at 9:24 am
Lynn Pettis (6/11/2013)
Sean Lange (6/11/2013)
declare @MyDate datetime = '2013-03-08'
--set @MyDate = '2014-08-08'
set @MyDate = dateadd(month, 3, dateadd(yy, datediff(yy, 0, @MyDate), 0)) --gets April 1st for the current...
June 11, 2013 at 9:16 am
It could be locking especially if there is a transaction outside the loop. From the brief description it sounds like you just make that cursor go the way of the...
June 11, 2013 at 8:57 am
This should do it.
declare @MyDate datetime = '2013-03-08'
--set @MyDate = '2014-08-08'
set @MyDate = dateadd(month, 3, dateadd(yy, datediff(yy, 0, @MyDate), 0)) --gets April 1st for the current year.
select dateadd(wk, datediff(wk, 0,...
June 11, 2013 at 8:53 am
This sounds like parameter sniffing to me.
http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/%5B/url%5D
Make sure you read through all 3 segments of this article.
June 11, 2013 at 8:38 am
Viewing 15 posts - 7,996 through 8,010 (of 15,381 total)