Click here to Skip to main content
15,915,867 members
Home / Discussions / Database
   

Database

 
AnswerRe: set command error Pin
Marek Grzenkowicz29-Nov-07 22:22
Marek Grzenkowicz29-Nov-07 22:22 
GeneralRe: set command error Pin
veereshIndia29-Nov-07 22:27
veereshIndia29-Nov-07 22:27 
GeneralRe: set command error Pin
veereshIndia29-Nov-07 22:39
veereshIndia29-Nov-07 22:39 
GeneralRe: set command error Pin
riyam hussain mm30-Nov-07 0:42
riyam hussain mm30-Nov-07 0:42 
AnswerRe: set command error Pin
Joe29-Nov-07 22:30
Joe29-Nov-07 22:30 
QuestionBulk Update Fails Pin
Joe29-Nov-07 21:58
Joe29-Nov-07 21:58 
AnswerRe: Bulk Update Fails Pin
andyharman29-Nov-07 22:36
professionalandyharman29-Nov-07 22:36 
GeneralRe: Bulk Update Fails Pin
Joe29-Nov-07 23:46
Joe29-Nov-07 23:46 
andyharman wrote:
Can you post some of the code up here


Yes,sure. The following lists the logic and flow of my proc.


.... Proc declarations go here ....


Begin Transaction

Declare @tblCategory Table (CategoryID BigInt)

Insert into @tblCategory(CategoryID)
Select A.CategoryID from Shop A Where ProductName = @pProdName

If exists(select categoryId from @tblCategory)
begin
  Declare @tblLocalities Table(CategoryID BigInt, LocalityID int)
  Insert into @tblLocalities (categoryid,localityid) 
  select B.CategoryID, B.localityId from ShopGroup B, Shop A
  where A.CategoryID = B.CategoryID and A.ProductName = @pProdName
  
  If @@rowcount > 0
  begin
     Update Shop Set Ranking = 2 where categoryID in 
     (select t.CategoryID from @tblLocalities t)
   end
end
If @@error > 0
Begin
  rollback transaction
end
else
begin
  commmit transaction
end

GeneralRe: Bulk Update Fails Pin
andyharman30-Nov-07 2:06
professionalandyharman30-Nov-07 2:06 
AnswerRe: Bulk Update Fails Pin
Mike Dimmick30-Nov-07 0:58
Mike Dimmick30-Nov-07 0:58 
GeneralRe: Bulk Update Fails Pin
Joe30-Nov-07 1:23
Joe30-Nov-07 1:23 
QuestionA recursive dilema??? Pin
AndyBrew7029-Nov-07 21:06
AndyBrew7029-Nov-07 21:06 
AnswerRe: A recursive dilema??? Pin
pmarfleet29-Nov-07 21:17
pmarfleet29-Nov-07 21:17 
AnswerRe: A recursive dilema??? Pin
AndyBrew7029-Nov-07 23:55
AndyBrew7029-Nov-07 23:55 
Questionsql,query very urgent Pin
rameshdontagani29-Nov-07 19:14
rameshdontagani29-Nov-07 19:14 
AnswerRe: sql,query very urgent Pin
Joe29-Nov-07 19:41
Joe29-Nov-07 19:41 
GeneralRe: sql,query very urgent Pin
rameshdontagani29-Nov-07 19:44
rameshdontagani29-Nov-07 19:44 
GeneralRe: sql,query very urgent Pin
Vasudevan Deepak Kumar29-Nov-07 19:54
Vasudevan Deepak Kumar29-Nov-07 19:54 
AnswerRe: sql,query very urgent Pin
Vasudevan Deepak Kumar29-Nov-07 19:55
Vasudevan Deepak Kumar29-Nov-07 19:55 
QuestionMySQL quick question Pin
sonywar29-Nov-07 14:32
sonywar29-Nov-07 14:32 
QuestionRe: MySQL quick question Pin
TJoe30-Nov-07 2:34
TJoe30-Nov-07 2:34 
AnswerRe: MySQL quick question Pin
andyharman30-Nov-07 2:49
professionalandyharman30-Nov-07 2:49 
Question"Logon Failed. Please Try Again." [modified] Pin
Reveille29-Nov-07 11:30
Reveille29-Nov-07 11:30 
AnswerRe: "Logon Failed. Please Try Again." Pin
Paul Conrad29-Nov-07 12:59
professionalPaul Conrad29-Nov-07 12:59 
GeneralRe: "Logon Failed. Please Try Again." Pin
Reveille29-Nov-07 14:50
Reveille29-Nov-07 14:50 

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.