Viewing 15 posts - 18,571 through 18,585 (of 18,923 total)
Here's an exemple that is not too bulldozer but it still ain't too pretty :
USE pubs
DECLARE @var1 VARCHAR(12)
DECLARE @var2 VARCHAR(30)
SET ROWCOUNT 17
SELECT @var1 = au_id, @var2 = au_lname FROM...
February 9, 2005 at 11:20 am
NP... it's just that I've seen this mistake like 3 times yesterday and I thaught it might be a good idea to point it out
February 9, 2005 at 6:25 am
Looks like it can't be done that way.
Any other shortcut to propose Frank? (besides letting EM recreate the table)
February 8, 2005 at 2:43 pm
I would simply create the SerialNo as an identity(1,1) field
you can run this script to change it's state so that it increments on its own :
ALTER TABLE YourTableNAME
ALTER COLUMN...
February 8, 2005 at 2:19 pm
HTH
BTW my name is Remi, "Hold hand" only means that I posted between 300 and 399 messages
. It's just like "newbie" and...
February 8, 2005 at 2:11 pm
I just reread your post... Does the column SerialNo needs to be incremented individually for each patient or just needs to be incremented regardless of which patient has been inserted?
February 8, 2005 at 2:08 pm
CREATE FUNCTION fnGetGlucoseDefault (@Patient_id as int)
RETURNS SMALLINT
AS
Return (Select Glucose FROM dbo.MyTable where Patient_id = @Patient_id AND EffectiveDate = (Select MAX(Effectivedate) from dbo.MyTable where Patient_id = @Patient_id))
GO
Then you can set the...
February 8, 2005 at 2:04 pm
I'll take that star
. But I'll just leave you with this warning : The code I gave you assumes that a value...
February 8, 2005 at 1:39 pm
Ya that's a nice tool... too bad I don't have enough time to make my project comply with all elements... but at least I try to make every new object...
February 8, 2005 at 1:34 pm
Hehe.. straight to the point, thanx for pointing out this best practice and rephrasing my opinion in clearer terms
.
February 8, 2005 at 1:05 pm
I've come up with a situation like this today and I found out that the first exists statement was using almost as much resource than the update statement that was...
February 8, 2005 at 1:03 pm
Have you tried this ? :
strResult = ADOConnection.Execute (strSQL).Fields(0).value
February 8, 2005 at 12:54 pm
I think that sql server is assuming that you are trying to do a correlation query and since the field exists in the first query it doesn't error out..
have you...
February 8, 2005 at 12:51 pm
The problem is not how to get the rank, but what is the best method to get it. Remember that he must be able to select a single line...
February 8, 2005 at 11:53 am
1 - Do you really need to have all left joins for this query? This can cause great performance degredation on larger tables.
2- Try running sp_who to see if...
February 8, 2005 at 11:35 am
Viewing 15 posts - 18,571 through 18,585 (of 18,923 total)