Viewing 15 posts - 46 through 60 (of 105 total)
I think that's just meant to be some strange gremlin emoticon.
December 18, 2006 at 2:17 pm
May be a governmental agency if they have the TIME of birth on file.
That would explain the quantity...
December 18, 2006 at 1:18 pm
a) Gather the appropriate names and ages(temporary table)
declare @tomorrow datetime select @tomorrow = dateadd(d, 1, getdate()) select emp_name, YearsOld=datediff(yyyy, emp_dob, @tomorrow+1) --...
December 18, 2006 at 12:41 pm
True. If you're not going to use my final recommendation, NOT EXISTS is probably the way to go.
I wouldn't be surprised if SQL Server optimized all three (NOT IN, NOT...
December 18, 2006 at 11:44 am
There's many ways to structure it...
In the WHERE clause, you can do:
where not InspectionID in (Select InspectionID from ClerkCitations) and not InspectionID in (Select InspectionID from OutletCitations)
or you could...
December 16, 2006 at 6:27 pm
It's definitely possible.
If all else fails, you can always fall back on cursors or loops.
Here's an attempt at a set-based approach:
declare @UserActivity table(UserID int, WorkDate datetime) insert into @UserActivity select 1, '12/01/2005...
December 16, 2006 at 5:50 pm
There are many ways.
Here are a couple:
declare @MyDateAndTime datetime select @MyDateAndTime = getdate() select dateadd(d, 0, datediff(day, 0, @MyDateAndTime)) select convert(datetime, convert(char(8), @MyDateAndTime, 112))
Sorry. I just quickly scanned your post. That will give...
December 15, 2006 at 11:43 pm
It's probably a computed column.
In Enterprise Manager, find the table, go to Design Table, and check out the formula property for the column in question.
December 15, 2006 at 5:31 pm
Still... why should the results fluctuate on him?
(Assuming all conditions are the same and they're not dependent on something variable like getdate)
If he's simply doing a Select he shouldn't have...
December 15, 2006 at 3:51 pm
I know.
I just meant that reading the original code annoyed me so much I pretty much gave up on it.
You may have managed to salvage it but I was beyond...
December 15, 2006 at 9:08 am
All this is giving me a headache.
Must be the lack of parentheses separating the ANDs from the ORs.
I'm not even going to try to read the previous posts. Here's ANOTHER...
December 15, 2006 at 9:00 am
How about this way?
(Of course, I am assuming there's only the one entry per day)
declare @MachineDtl table([Date] datetime, ...
December 14, 2006 at 4:57 pm
You can probably cut them out and try a SELECT DISTINCT, instead.
actually, you could probably just remove the SUM(...) part, if you wanted.
It IS very confusing...
December 14, 2006 at 2:19 pm
I'm not sure what you mean by the commas but you should probably look into the ParseName function.
December 14, 2006 at 2:14 pm
Viewing 15 posts - 46 through 60 (of 105 total)