Viewing 15 posts - 151 through 165 (of 334 total)
Assuming Twain is the son of Mark, who is the son of Chase, who is the son of Chevy.. would something like this work for you as a starting point?...
March 11, 2013 at 3:43 pm
I think what he's looking for is related to
SET IDENTITY_INSERT DBO.YOURTABLE ON
March 11, 2013 at 10:54 am
If I were to guess from my limited knowledge of Hashbytes that this is treated like a computed column and doesn't actually store anything, only returning a value on select.
March 11, 2013 at 10:17 am
You could but wouldn't it be easier to set that flag to true during the "houselceaning" procedure for that record?
March 8, 2013 at 3:45 pm
That's why I used -3 milliseconds, Lynn. 🙂
March 8, 2013 at 3:23 pm
Thanks, Sean.
I did all the casting to account for a time like 2013-03-08 15:18:50.807 and you add a day you get 2013-03-09 15:18:50.807.
If you take way 1-3 milliseconds from that...
March 8, 2013 at 3:21 pm
If that's the only parameter just break your procedure into two queries.
IF (@firstTime IS NULL or ISNULL(TIMES_TESTED,0)=@firstTime)
BEGIN
...FIRST SARGable QUERY
END
ELSE
BEGIN
...SECOND SARGable...
March 8, 2013 at 3:17 pm
So you're just looking to update each date to the end of the day?
Will this help you get started?
declare @datefield datetime
set @datefield = GETDATE()
select @datefield originalDate, dateadd(ms,-3,cast((dateadd(d,1,cast(@datefield as DATE)) )as...
March 8, 2013 at 3:11 pm
Pretty much if they all thought, as I did, that you reposted it in the proper forum.
March 8, 2013 at 3:03 pm
Bear in mind that it's not infallible. If I use select * from mytable
inside my procedure you won't find the column you're looking for. You might want to check...
March 8, 2013 at 11:28 am
You mean like this?
ALTER VIEW [Capacity].[vw_TrusteeProductFilter]
AS
SELECT NULL TrusteeID
, NULL CapacityTypeLookup
, NULL CapacityLevelLookup
, NULL HomeLoanProductTypeLookup
, NULL FilterClassLookup
, NULL ReferralCount
, NULL ReferralCapacity
,...
March 8, 2013 at 8:19 am
if on table has two months worth of data and the other has only one month what ARE you expected results? That you see only the complete information for one...
March 8, 2013 at 8:15 am
Sql Server doesn't allow it but according to MSDN Visual Studio gives you a bypass on that.
http://msdn.microsoft.com/en-us/library/f5scy1hs(v=VS.80).aspx
March 8, 2013 at 8:08 am
Does this work for you?
create procedure dbo.yourprocedurename
as
begin
SELECT * INTo #sStaffNames
FROM (select p.personid,p.LastName + N', ' + p.FirstName AS Supervisor, S.StaffID---
from Staff as s inner join people as p
on s.PersonID =...
March 7, 2013 at 4:31 pm
I applied some quick GoogleFu to find this for you.. there are many examples of what you want out there.
http://www.kodyaz.com/articles/concatenate-using-xml-path.aspx
March 7, 2013 at 3:37 pm
Viewing 15 posts - 151 through 165 (of 334 total)