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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-10-15 : 08:08:24
|
| Pial writes "I want to do the same job in stored procedure as the following function does in ASP-Function DelTree(tId)call datalinksql="select Id,rootId,listOrd from tree where parentId="&tIdrs.open sql,conn,0,1if not rs.eof thendim tmpIddim tmprootIddim tmplistOrdtmpId=rs("Id")tmprootId=rs("rootId")tmplistOrd=rs("listOrd")sql="DELETE FROM tree WHERE parentId="&tIdconn.execute(sql)Response.Write "UPDATE tree SET listOrd=listOrd-1 WHERE rootId="& tmprootId &" And listOrd>"& tmplistOrdconn.execute("UPDATE tree SET listOrd=listOrd-1 WHERE rootId="& tmprootId &" And listOrd>"& tmplistOrd)DelTree(tmpId)end ifEnd Function" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-10-15 : 09:27:34
|
| What have you tried so far? This seems pretty straight forward...Jay White{0} |
 |
|
|
|
|
|