Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


An Example of Test-Driven Development, Part 3


An Example of Test-Driven Development, Part 3

Author
Message
Andy Leonard
Andy Leonard
SSC Eights!
SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)

Group: General Forum Members
Points: 851 Visits: 1093
Comments posted to this topic are about the item An Example of Test-Driven Development, Part 3

Andy Leonard
Data Philosopher, Enterprise Data & Analytics
David.Poole
David.Poole
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6108 Visits: 3243
When I'm running scripts like this I make sure that the failure notices print ****FAILURE as this standard out like a sore thumb when the output is echoed to a file.

The other thing to consider is whether a RAISERROR would be a good idea because if you run it using SQLCMD.EXE then this allows the windows command file to make use of %ERRORLEVEL%.

It depends on what you want to do. In some cases I want the script to work through reporting all errors. In others I want the process to terminate at the first sign of an error.

LinkedIn Profile

Newbie on www.simple-talk.com
JJ B
JJ B
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 2859
What I liked about this article was the trick for search and replace using the IDE. The way I do it could not be used by most people, and I couldn't figure out how everyone else does it. Until now, I figured that most people probably just don't bother to clean up names. Now I see that other people have a way to do it. Thanks for showing that.
Hemal Modi
Hemal Modi
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 16
Hi Andy,
Interesting read! One this I would like to inform you that when pushing the results to text through your AutoGen scripts the generated scripts were getting truncated to 256 chars. For those ignorant of this limitation including me Smile this can be rectified by going to Tools --> options --> Query Results --> SQL Server --> Results to text and setting "Maximum number of characters displayed in each column" to something higher like 1000.

I hope my 2 cents worth would help someone.

Keep up the good work.

Cheers,

Hemal
Andy Leonard
Andy Leonard
SSC Eights!
SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)SSC Eights! (851 reputation)

Group: General Forum Members
Points: 851 Visits: 1093
Thanks Hemal!

I completely forgot to include that in the article.

:{> Andy

Andy Leonard
Data Philosopher, Enterprise Data & Analytics
gitmo
gitmo
Valued Member
Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)

Group: General Forum Members
Points: 71 Visits: 187
Good article. I've learned a lot of useful tricks in this series.
One question: You said, "– download the updated project using the link at the end of this article.".

Where exactly is this link?Ermm
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search