Viewing 15 posts - 18,571 through 18,585 (of 18,926 total)
I think I could provide better help if I could see the whole query and some sample data... I'm pretty sure that my solution is incomplete but it might get...
February 9, 2005 at 12:25 pm
This is not the prettiest code I've ever written but it works...
CREATE TABLE [Numbers] (
[PkNumber] [int] IDENTITY (1, 1) NOT NULL ,
CONSTRAINT [Pk_Number] PRIMARY KEY CLUSTERED
(
[PkNumber]
) ON...
February 9, 2005 at 11:55 am
Try this setup :
set statistics io on
--set statistics time on
go
--begin tran
EXEC dbo.MyProc
--rollback tran
set statistics io off
--set statistics time off
check out the message sections of QA to get that info...
February 9, 2005 at 11:27 am
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
Viewing 15 posts - 18,571 through 18,585 (of 18,926 total)