Click here to Skip to main content
16,006,535 members
Home / Discussions / Database
   

Database

 
QuestionTricky table join Pin
Wjousts5-Jan-07 2:47
Wjousts5-Jan-07 2:47 
AnswerRe: Tricky table join Pin
ednrgc5-Jan-07 6:40
ednrgc5-Jan-07 6:40 
GeneralRe: Tricky table join Pin
Wjousts5-Jan-07 7:37
Wjousts5-Jan-07 7:37 
GeneralRe: Tricky table join Pin
ednrgc5-Jan-07 8:31
ednrgc5-Jan-07 8:31 
GeneralRe: Tricky table join Pin
Wjousts5-Jan-07 8:47
Wjousts5-Jan-07 8:47 
QuestionHow to debug stored procedure Pin
mohd imran abdul aziz5-Jan-07 0:10
mohd imran abdul aziz5-Jan-07 0:10 
AnswerRe: How to debug stored procedure Pin
WoutL5-Jan-07 0:40
WoutL5-Jan-07 0:40 
AnswerRe: How to debug stored procedure Pin
Pete O'Hanlon5-Jan-07 2:43
mvePete O'Hanlon5-Jan-07 2:43 
Try this version instead, which doesn't use cursors:

CREATE PROCEDURE [dbo].[servchargsav]
@branch varchar(20),
@serv varchar(20),
@scharge varchar(20),
@cname varchar(50),
@ip varchar(20)
AS
if @branch is not null
begin
if @serv is not null
begin
SELECT @Count = COUNT(1) FROM branchwisecharge 
WHERE branchid = @branch and serviceid =@serv

-- A count of zero means we can't find this record.
IF @Count = 0
BEGIN
	INSERT INTO BranchWiseService(branchid, serviceid, servicecharge, 
	bcreatedby, bcreateddt,ipadd) 
	VALUES (@branch, @serv, @scharge, @cname, getdate(), @IP)
ELSE
	UPDATE branchwisecharge set servicecharge = @scharge, bmodifiedby = @cname,
	bmodifieddt = getdate() where branchid = @branch and serviceid =@serv 
END

END
END

GO



the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer

Deja View - the feeling that you've seen this post before.

GeneralRe: How to debug stored procedure Pin
mohd imran abdul aziz5-Jan-07 3:23
mohd imran abdul aziz5-Jan-07 3:23 
GeneralRe: How to debug stored procedure Pin
Mike Dimmick5-Jan-07 4:59
Mike Dimmick5-Jan-07 4:59 
QuestionBitwise operation for WHERE clause Pin
Leftyfarrell4-Jan-07 12:33
Leftyfarrell4-Jan-07 12:33 
AnswerRe: Bitwise operation for WHERE clause Pin
Colin Angus Mackay4-Jan-07 14:01
Colin Angus Mackay4-Jan-07 14:01 
GeneralRe: Bitwise operation for WHERE clause Pin
Leftyfarrell4-Jan-07 14:12
Leftyfarrell4-Jan-07 14:12 
QuestionPlaying Wav Files From Database Pin
Now_Loading4-Jan-07 11:09
Now_Loading4-Jan-07 11:09 
AnswerRe: Playing Wav Files From Database Pin
Chris Buckett4-Jan-07 21:40
Chris Buckett4-Jan-07 21:40 
GeneralRe: Playing Wav Files From Database Pin
Colin Angus Mackay5-Jan-07 4:16
Colin Angus Mackay5-Jan-07 4:16 
GeneralRe: Playing Wav Files From Database Pin
Chris Buckett5-Jan-07 4:20
Chris Buckett5-Jan-07 4:20 
Questionsql query ... Pin
groundzero1114-Jan-07 10:01
groundzero1114-Jan-07 10:01 
AnswerRe: sql query ... Pin
Colin Angus Mackay4-Jan-07 13:55
Colin Angus Mackay4-Jan-07 13:55 
GeneralRe: sql query ... Pin
groundzero1117-Jan-07 5:56
groundzero1117-Jan-07 5:56 
QuestionNew at ADO.NET Editing Data Pin
Blekk4-Jan-07 8:00
Blekk4-Jan-07 8:00 
QuestionTable permissions Pin
VK-Cadec4-Jan-07 1:49
VK-Cadec4-Jan-07 1:49 
AnswerRe: Table permissions Pin
VK-Cadec4-Jan-07 3:29
VK-Cadec4-Jan-07 3:29 
QuestionHow to know Store procedure Input and OutPut Parameters through programs Pin
indiaone3-Jan-07 20:05
indiaone3-Jan-07 20:05 
AnswerRe: How to know Store procedure Input and OutPut Parameters through programs Pin
Colin Angus Mackay3-Jan-07 22:59
Colin Angus Mackay3-Jan-07 22:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.