Click here to Skip to main content
15,890,438 members
Home / Discussions / Database
   

Database

 
QuestionSql Pin
maana_203017-Oct-08 5:57
maana_203017-Oct-08 5:57 
AnswerSample Table create scripts Pin
David Mujica17-Oct-08 6:37
David Mujica17-Oct-08 6:37 
AnswerRe: Sql Pin
Paul Conrad17-Oct-08 6:38
professionalPaul Conrad17-Oct-08 6:38 
AnswerRe: Sql Pin
Wendelius19-Oct-08 0:12
mentorWendelius19-Oct-08 0:12 
QuestionSET NOCOUNT ON; Pin
geekfromindia17-Oct-08 5:09
geekfromindia17-Oct-08 5:09 
AnswerRe: SET NOCOUNT ON; Pin
Jon_Boy17-Oct-08 10:19
Jon_Boy17-Oct-08 10:19 
GeneralRe: SET NOCOUNT ON; Pin
geekfromindia17-Oct-08 12:01
geekfromindia17-Oct-08 12:01 
GeneralRe: SET NOCOUNT ON; Pin
Jon_Boy17-Oct-08 13:23
Jon_Boy17-Oct-08 13:23 
Typically I would use @@ROWCOUNT in a stored procedure where there are several transactions that are going to modify records. You can then be certain that every update, delete, insert occurs as expected; esp. in stored procedures where it's all or nothing. If 1 table doesn't get modified as expected, you can then rollback.

IE: You have a SP (with NOCOUNT = ON) that has several table updates for updating general ledger entries for A/R and then write the changes into a history table. If one update fails (by checking @@ROWCOUNT), the entire transaction gets rolled.

Returning a rowcount (meaning NOCOUNT = OFF) is good for a very simple sps that return a result set and the row count can be displayed for information purposes and ensure the query didn't error off.

Any suggestions, ideas, or 'constructive criticism' are always welcome.

AnswerRe: SET NOCOUNT ON; Pin
Mycroft Holmes17-Oct-08 22:57
professionalMycroft Holmes17-Oct-08 22:57 
QuestionProblem with creating a table using a stored procedure [modified] Pin
TheComputerMan17-Oct-08 4:29
TheComputerMan17-Oct-08 4:29 
AnswerRe: Problem with creating a table using a stored procedure Pin
TheComputerMan17-Oct-08 5:22
TheComputerMan17-Oct-08 5:22 
AnswerRe: Problem with creating a table using a stored procedure Pin
Kevin Horgan23-Oct-08 2:08
Kevin Horgan23-Oct-08 2:08 
GeneralRe: Problem with creating a table using a stored procedure Pin
TheComputerMan23-Oct-08 2:20
TheComputerMan23-Oct-08 2:20 
GeneralRe: Problem with creating a table using a stored procedure Pin
TheComputerMan23-Oct-08 3:35
TheComputerMan23-Oct-08 3:35 
Question'Open Table' menu option missing in SSMS 08 (SQL compact 3.5) Pin
Jon_Boy17-Oct-08 2:44
Jon_Boy17-Oct-08 2:44 
AnswerRe: 'Open Table' menu option missing in SSMS 08 (SQL compact 3.5) Pin
Jon_Boy18-Oct-08 14:41
Jon_Boy18-Oct-08 14:41 
QuestionFind Percentage? Pin
PadmaPriya.S16-Oct-08 23:59
PadmaPriya.S16-Oct-08 23:59 
AnswerRe: Find Percentage? Pin
Ashfield17-Oct-08 0:54
Ashfield17-Oct-08 0:54 
GeneralRe: Find Percentage? Pin
PadmaPriya.S17-Oct-08 1:09
PadmaPriya.S17-Oct-08 1:09 
GeneralRe: Find Percentage? Pin
Ashfield17-Oct-08 1:12
Ashfield17-Oct-08 1:12 
GeneralRe: Find Percentage? Pin
PadmaPriya.S17-Oct-08 1:14
PadmaPriya.S17-Oct-08 1:14 
GeneralRe: Find Percentage? Pin
Ashfield17-Oct-08 1:29
Ashfield17-Oct-08 1:29 
GeneralRe: Find Percentage? Pin
PadmaPriya.S17-Oct-08 1:39
PadmaPriya.S17-Oct-08 1:39 
QuestionIs this possible?? Pin
VinothRao16-Oct-08 20:48
VinothRao16-Oct-08 20:48 
AnswerRe: Is this possible?? Pin
Mycroft Holmes16-Oct-08 21:39
professionalMycroft Holmes16-Oct-08 21:39 

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.