Viewing 15 posts - 496 through 510 (of 1,217 total)
I have verified the code now on a few examples.
The code I posted originally only works correctly if there is one single row in table @times.
The newer code -...
December 15, 2006 at 9:22 am
Dave,
I'm pretty sure I got it in my code.. it isn't lack of parentheses, the original code is all wrong. Don't read the original code, read the description... as I...
December 15, 2006 at 9:06 am
Actually, one more thing - in case you need to display all rows:
LEFT JOIN @times t ON t.totime >= s.fromtime AND t.fromtime < s.totime
will do the trick.
December 15, 2006 at 8:29 am
The result is incorrect because both join conditions and CASE are incorrect. This could work... Sorry, but I don't have time enough to think about better solution so I just corrected...
December 15, 2006 at 8:26 am
No I haven't seen that... could you post the view definitions? I don't think we can look for a solution if we have no idea what the views do.
December 15, 2006 at 6:39 am
Hi oren,
FYI, Ten Centuries is a "title" (depends basically on number of posts - e.g. it says "Newbie" at your posts, because you only posted a few times), user name can...
December 15, 2006 at 6:27 am
It shouldn't be that bad... Try this:
/*test data*/
create table #alert (Alert_id int identity, response_code varchar(10), [name] varchar(50), create_date datetime, acknowledged bit)
INSERT INTO #alert (response_code, [name], create_date, acknowledged) VALUES ('RIR','Cameron Co.','20050805',0)
INSERT...
December 15, 2006 at 4:25 am
I absolutely agree with that... it is the same as if I would start to design a commercial application in VB based on my knowledge of Basic from ZX-81 and Atari. I can understand great...
December 15, 2006 at 1:26 am
Hello,
i think it would really help if you can post the table DDL (CREATE TABLE .... ) for at least one table as an example.. with a few rows of...
December 14, 2006 at 9:09 am
Depends on error severity. Some errors automatically rollback a transaction, some don't. If you want to be sure, you have to use RAISERROR, or IF condition ROLLBACK TRAN.
I only know the...
November 30, 2006 at 8:36 am
Yes, you have to convert the number to character data type.
Depending on the type of output you may find it useful to add LTRIM to the conversion suggested by Jeff, to...
November 30, 2006 at 6:08 am
Yes, you can use variables and dynamic SQL... but in this case I would say "unfortunately you can". If you need to resort to such approach, something is wrong with...
November 30, 2006 at 5:57 am
Hi Srinidhi,
you are already receiving responses in the original topic where you mentioned the same question.
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=326295&p=2
And I agree with Gila that there is little use trying to rewrite the...
November 30, 2006 at 5:38 am
I'm not sure I understand the question correctly...
Why would you want to do this : "if @var3 is NULL, keep the column value NULL, else put @var3 in it"?...
November 30, 2006 at 5:25 am
Hello,
there is an undocumented procedure sp_MSforeachdb which can be used to perform a task on all databases. I have never needed that, so I can't tell for sure whether it can...
November 22, 2006 at 3:08 am
Viewing 15 posts - 496 through 510 (of 1,217 total)