Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
timmemac
Starting Member
6 Posts |
Posted - 2010-06-10 : 11:12:28
|
| Hi, I have a problem updating two tables create table sales(sid int,name varchar(30),code int,descr varchar(30)) create table Add(id int,addr varchar(30)) i have the above tables to be updated.Input Params = @sname,@scode,@id,@addcorresponding columnssales.name = @sname sales.code = @scodesid,id = @idaddr = @addif @scode = 5 then update descrwhere sid = @id and id = @idRegardsJane |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2010-06-10 : 11:16:43
|
| Ok, so what is your problem and what have you tried so far? |
 |
|
|
janets20
Starting Member
12 Posts |
Posted - 2010-06-10 : 11:33:55
|
| update testcust as c,testadd as aset c.name = @sname ,c.code=@scode IF isnull(@des,'') <> '' begin ,c.descr = @des end,a.addr=@addrwhere c.id = @id and a.id = @id |
 |
|
|
|
|
|
|
|