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 |
|
sadbjp
INNER JOIN
41 Posts |
Posted - 2007-05-11 : 11:42:29
|
| Hi,I have two tables:1. RubricReport2. RubricReportDetailHow can I code this step in my stored procedure:If @ReportID is NULL, insert a row into RubricReport table, and set @ReportID=@@IDENTITY; otherwise, update table RubricReport for columns LastUpdate and LastUpdateBy, and delete table RubricReportDetail where ReportID=@ReportID.Table RubricReport has columns ReportID, County,Dsitrict, DataYears, LastUpdate and LastUpdateByTable RubricReportDetail has columns ReportID, IndicatorID, LocalPerfKindly help me.Thanks in advance |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-11 : 11:47:22
|
| please do not cross post. It's annoying.you already asked the question here:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=83465_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|