Viewing 15 posts - 10,321 through 10,335 (of 18,926 total)
May I ask why you are using code like this??? Sql server is build to handle sets of data, not procedural stuff.
January 10, 2007 at 3:25 pm
declare @measureid int
declare @monthnum int
set @monthnum=0
set @measureid=0
while @monthnum<12--month loop begin
begin
set @monthnum=@monthnum+1
set @measureid = 0
while @measureid<28
begin --measureid loop begin
select @monthnum
set @measureid=@measureid+1
end --measureid loop end
end --month loop end
January 10, 2007 at 3:24 pm
Lol, might I suggest adding a unique constraint once this is over with... so that you won't have to put those gloves back on?
January 10, 2007 at 2:28 pm
Well it looks like you will first have to clean the data. Then the query I first provided will do the job just fine.
Start a new thread if you need...
January 10, 2007 at 2:14 pm
Do you have a secondary date on the same record, an auditing table or an identity column?
January 10, 2007 at 1:57 pm
So what did you do to solve the remaining of the problem?
January 10, 2007 at 11:11 am
can we see the code that leads to this result?
January 10, 2007 at 11:10 am
Looks to me like the client thinks that the procedure is name
"dbo.usp_AT @ Prog, @Chapt" instead of named dbo.usp_AT with 2 parameters.
Also is this a typo (@ Prog) >>...
January 10, 2007 at 10:42 am
This should get you started.
EXEC sp_msForEACHDB 'IF EXISTS (Select * from ?..SysObjects WHERE Name = ''TriggerName'')
BEGIN
USE ?
;
ALTER TRIGGER script
END'
January 10, 2007 at 10:41 am
SCAN : reads all rows.
SEEK : binary search algorithm to find only the required row.
Could you reindex and / or update the statistics on the table.
If that doesn't help you...
January 10, 2007 at 10:38 am
This is taken from the source code of the ROUTINE view :
ROUTINE_DEFINITION = convert(nvarchar(4000),
(SELECT TOP 1 CASE WHEN encrypted = 1 THEN NULL ELSE com.text END
FROM syscomments com WHERE com.id=o.id...
January 10, 2007 at 10:36 am
Agreed here. But I would think that the best possible documentation can hardly be as accurate and always up to date as the actual used code. That's why I have built a...
January 10, 2007 at 9:52 am
Your guess will be correct 99.9% of the time
.
January 10, 2007 at 9:24 am
Is it possible that you have more than one record per day per SSN and that you would be in need of some sort of tie breaker?
Can you run this...
January 10, 2007 at 9:20 am
Viewing 15 posts - 10,321 through 10,335 (of 18,926 total)