Viewing 15 posts - 31 through 45 (of 153 total)
how can I modify usp_Prognote_Insert to return the value of the PK if a record already exists?
This doesn't seem to work:
CREATE PROCEDURE usp_ProgNote_Insert
@SecondaryKeyValue int
, @EmpName...
December 29, 2007 at 8:41 am
Thanks so much. Believe it or not, I spent an hour on Google and never could get a clear example to work from.
December 29, 2007 at 8:19 am
sorry, should have supplied that to begin with:
CREATE PROCEDURE usp_ProgNote_Insert
@SecondaryKeyValue int
, @EmpName varchar(150)
, @PrimaryKeyValue int OUTPUT AS
IF EXISTS
(SELECT
pn.AppointmentID
FROM ProgNote pn
WHERE pn.AppointmentID = @SecondaryKeyValue
)
RETURN
INSERT...
December 28, 2007 at 2:03 pm
You've helped me several times, Jeff. Thanks!
September 9, 2007 at 3:38 pm
Thanks,
Next question is if the return data is null, how do I set the declared variable to '' (empty string)?
Here's what I have so far that's not working:
SELECT @FHComm=p.TextBody
FROM PartyText...
September 3, 2007 at 4:20 pm
Thanks so much. THe problem is on the frontend afterall.
August 24, 2007 at 10:13 am
Thanks, Jeff. You know you're talking to a rookie. Or at least not a real SQL person. I will format on the frontend as you suggest.
August 4, 2007 at 3:35 pm
sorry for the unclear question. I've got it worke out. Thanks so much.
August 4, 2007 at 3:53 am
table def:
CREATE TABLE [dbo].[AilmentDetail] (
[AilmentDetailID] [int] IDENTITY (0, 1) NOT NULL ,
[AilmentID] [int] NOT NULL ,
[DataPointID] [int] NOT NULL ,
[DataValue] [varchar] (200) NOT NULL ,
[DateStart] [smalldatetime] NULL ,
[DateEnd] [smalldatetime] NULL...
July 21, 2007 at 9:57 am
Viewing 15 posts - 31 through 45 (of 153 total)