Click here to Skip to main content
15,885,757 members
Home / Discussions / Database
   

Database

 
AnswerRe: Check if SQL is doing some king of process Pin
Expert Coming7-Mar-09 4:24
Expert Coming7-Mar-09 4:24 
AnswerRe: Check if SQL is doing some king of process Pin
Colin Angus Mackay7-Mar-09 12:20
Colin Angus Mackay7-Mar-09 12:20 
QuestionServer 08 Execute SQL Pin
enipla6-Mar-09 9:45
enipla6-Mar-09 9:45 
AnswerRe: Server 08 Execute SQL Pin
Colin Angus Mackay7-Mar-09 12:14
Colin Angus Mackay7-Mar-09 12:14 
GeneralRe: Server 08 Execute SQL Pin
enipla10-Mar-09 3:14
enipla10-Mar-09 3:14 
GeneralRe: Server 08 Execute SQL Pin
Colin Angus Mackay10-Mar-09 13:29
Colin Angus Mackay10-Mar-09 13:29 
GeneralRe: Server 08 Execute SQL Pin
enipla11-Mar-09 3:28
enipla11-Mar-09 3:28 
Questionuniting 3 tables Pin
suni_dotnet6-Mar-09 5:28
suni_dotnet6-Mar-09 5:28 
Hi All,
iam using if else for updating and inserting, i need to do this for 3 tables how can i unite them using unions or join..

IF EXISTS (SELECT col1,col2,col3,col4
FROM TableB)

UPDATE TableB
SET col2=TableA.col2,
col3=TableA.col3,
col4=TableA.col4
from TableA
where (TableB.col1 = TableA.col1
and TableA.Col5='no')

ELSE
INSERT INTO TableB (col1,col2,col3,col4)
select TableA.col1,TableA.col2,TableA.col3,TableA.col4

from TableA
where TableA.Col5='no';

and i need to repeat this code for TableC and TableD (along with TableA) for updating TableB. How can i unite all in one procedure.Hope iam clear if not i can...Please help...
may be the solution is simple but i dont know...
i tried but unable to ...
i cannot use 3 sp's, i need all in one procedure
Thanks in advance
AnswerRe: uniting 3 tables Pin
Colin Angus Mackay7-Mar-09 12:05
Colin Angus Mackay7-Mar-09 12:05 
Questionconditional select statment Pin
Meax5-Mar-09 22:31
Meax5-Mar-09 22:31 
AnswerRe: conditional select statment Pin
J4amieC5-Mar-09 22:42
J4amieC5-Mar-09 22:42 
GeneralRe: conditional select statment Pin
Meax5-Mar-09 23:14
Meax5-Mar-09 23:14 
AnswerRe: conditional select statment Pin
Rupesh Kumar Swami5-Mar-09 22:58
Rupesh Kumar Swami5-Mar-09 22:58 
GeneralRe: conditional select statment Pin
Meax5-Mar-09 23:16
Meax5-Mar-09 23:16 
GeneralRe: conditional select statment Pin
J4amieC6-Mar-09 0:08
J4amieC6-Mar-09 0:08 
GeneralRe: conditional select statment Pin
Luc Pattyn6-Mar-09 0:42
sitebuilderLuc Pattyn6-Mar-09 0:42 
GeneralRe: conditional select statment Pin
Rupesh Kumar Swami6-Mar-09 1:07
Rupesh Kumar Swami6-Mar-09 1:07 
Questionhow to encrypt stored procedure. Pin
Manprit.bagga5-Mar-09 18:10
Manprit.bagga5-Mar-09 18:10 
AnswerRe: how to encrypt stored procedure. Pin
Eddy Vluggen6-Mar-09 0:03
professionalEddy Vluggen6-Mar-09 0:03 
QuestionRe: how to encrypt stored procedure. Pin
Manprit.bagga6-Mar-09 23:45
Manprit.bagga6-Mar-09 23:45 
AnswerRe: how to encrypt stored procedure. Pin
Adrian Pasik7-Mar-09 3:44
Adrian Pasik7-Mar-09 3:44 
Questionsql query and index Pin
Shajeel5-Mar-09 17:36
Shajeel5-Mar-09 17:36 
QuestionClient would like to search.... Everything Pin
thrakazog5-Mar-09 14:00
thrakazog5-Mar-09 14:00 
AnswerRe: Client would like to search.... Everything Pin
Eddy Vluggen6-Mar-09 0:01
professionalEddy Vluggen6-Mar-09 0:01 
AnswerRe: Client would like to search.... Everything [modified] Pin
Eddy Vluggen7-Mar-09 3:00
professionalEddy Vluggen7-Mar-09 3:00 

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.