Click here to Skip to main content
15,914,795 members
Home / Discussions / Database
   

Database

 
Question*.dtsx file and Query execution problem Pin
For_IT3-Jul-06 23:01
For_IT3-Jul-06 23:01 
QuestionImprove the efficiency of Stored Procedures Pin
Uma Kameswari3-Jul-06 19:27
Uma Kameswari3-Jul-06 19:27 
AnswerRe: Improve the efficiency of Stored Procedures Pin
Colin Angus Mackay3-Jul-06 21:53
Colin Angus Mackay3-Jul-06 21:53 
AnswerRe: Improve the efficiency of Stored Procedures Pin
Frank Kerrigan4-Jul-06 0:14
Frank Kerrigan4-Jul-06 0:14 
AnswerRe: Improve the efficiency of Stored Procedures Pin
VK-Cadec11-Jul-06 8:56
VK-Cadec11-Jul-06 8:56 
QuestionDelete or update Pin
leckey3-Jul-06 3:38
leckey3-Jul-06 3:38 
AnswerRe: Delete or update Pin
Paul Conrad3-Jul-06 7:25
professionalPaul Conrad3-Jul-06 7:25 
AnswerRe: Delete or update Pin
Frank Kerrigan3-Jul-06 22:14
Frank Kerrigan3-Jul-06 22:14 
something like this. 0 is default value for PartNumber and if it does not exist than it will be created and a new part number will be returned,

create proc myProc
@PartNumber int = 0,
@PartDesc varchar
AS

Declare @partNo_Used

if @PartNumber = 0
Begin
-- Insert into Table
insert parts ( partdesc ) Values ( @PartDesc)
--- Get identity or part number
Set @partNo_Used = @@Indentity
End
ELSE
Begin
-- Update Record
update parts
SET partdesc = @PartDesc
Where Partnumber = @PartNumber

@partNo_Used = @PartNumber
End

-- Return Part and Desc
SELECT @partNo_Used , @PartDesc

GO



---------------------------------------------------------------------------
Look where you want to go not where you don't want to crash.

Bikers Bible
QuestionHuge DataBases [modified] Pin
hamidreza_buddy2-Jul-06 23:44
hamidreza_buddy2-Jul-06 23:44 
AnswerRe: Huge DataBases Pin
Colin Angus Mackay3-Jul-06 1:52
Colin Angus Mackay3-Jul-06 1:52 
AnswerRe: Huge DataBases Pin
Frank Kerrigan4-Jul-06 1:26
Frank Kerrigan4-Jul-06 1:26 
QuestionSQL SERVER 2005 - "error 193 installation net framework 2.0" Pin
hasantayyar2-Jul-06 1:10
hasantayyar2-Jul-06 1:10 
QuestionRead RTF and Word file from BLOB Pin
excession1-Jul-06 6:04
excession1-Jul-06 6:04 
AnswerRe: Read RTF and Word file from BLOB Pin
Paul Conrad4-Jul-06 14:10
professionalPaul Conrad4-Jul-06 14:10 
QuestionAccess database problem. Pin
Stanciu Vlad1-Jul-06 2:57
Stanciu Vlad1-Jul-06 2:57 
AnswerRe: Access database problem. Pin
Stanciu Vlad1-Jul-06 3:15
Stanciu Vlad1-Jul-06 3:15 
Questionmoving database in sql (question again) Pin
shaz jazz1-Jul-06 2:22
shaz jazz1-Jul-06 2:22 
AnswerRe: moving database in sql (question again) Pin
Colin Angus Mackay1-Jul-06 9:44
Colin Angus Mackay1-Jul-06 9:44 
GeneralRe: moving database in sql (question again) Pin
shaz jazz2-Jul-06 22:17
shaz jazz2-Jul-06 22:17 
GeneralRe: moving database in sql (question again) Pin
Colin Angus Mackay2-Jul-06 22:59
Colin Angus Mackay2-Jul-06 22:59 
GeneralRe: moving database in sql (question again) Pin
shaz jazz3-Jul-06 0:29
shaz jazz3-Jul-06 0:29 
GeneralRe: moving database in sql (question again) Pin
PlayByTheRules3-Jul-06 5:17
PlayByTheRules3-Jul-06 5:17 
GeneralRe: moving database in sql (question again) Pin
Colin Angus Mackay3-Jul-06 5:32
Colin Angus Mackay3-Jul-06 5:32 
GeneralRe: moving database in sql (question again) Pin
Colin Angus Mackay3-Jul-06 5:34
Colin Angus Mackay3-Jul-06 5:34 
AnswerRe: moving database in sql (question again) Pin
Frank Kerrigan3-Jul-06 22:18
Frank Kerrigan3-Jul-06 22:18 

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.