473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Incremental output in QA and writing to files

Hi;

Before I start let me say I know this is a silly way to go about
things, but it is one of those "my company made me do it" things.

My company is in the process of ( finishing ) migrating from foxpro to
sqlserver.

They have a foxpro program that does a lot of various updates. I
would like to write a tsql script to replace it.

The trick is that the tsql script would have to have some procedural
programming artifacts that I don't think it has.

I/my company would like the script to generate output messages that
the user can see while the script is running. Everytime I have ran a
script in query analyzer I usually don't see the output ("print"
statemetns, etc ) until all of the work is
done. Is there a way to run thing so I can see the output statements
as the work is being done?

Can print statements work from within a tsql loop?

The other thing is that I/my company wants the tsql script to write
output messages to a log file while it is operating ( for error
checking and other logging).

Is this possible with tsql?

Thanks in advance for the info

Steve
Jul 20 '05 #1
1 2929
st**********@yahoo.com (Steve) wrote in message news:<6f*************************@posting.google.c om>...
Hi;

Before I start let me say I know this is a silly way to go about
things, but it is one of those "my company made me do it" things.

My company is in the process of ( finishing ) migrating from foxpro to
sqlserver.

They have a foxpro program that does a lot of various updates. I
would like to write a tsql script to replace it.

The trick is that the tsql script would have to have some procedural
programming artifacts that I don't think it has.

I/my company would like the script to generate output messages that
the user can see while the script is running. Everytime I have ran a
script in query analyzer I usually don't see the output ("print"
statemetns, etc ) until all of the work is
done. Is there a way to run thing so I can see the output statements
as the work is being done?

Can print statements work from within a tsql loop?

The other thing is that I/my company wants the tsql script to write
output messages to a log file while it is operating ( for error
checking and other logging).

Is this possible with tsql?

Thanks in advance for the info

Steve


The output of PRINT doesn't appear until the batch completes, which is
why you can't see it - you could use RAISERROR WITH NOWAIT instead. As
for logging output, if you run your script with osql -o, then you can
get the output into a file.

But you might consider a wrapper script in Perl, VB, etc. to run the
statements in your TSQL script and handle the results. It will be much
easier to do parsing, text file manipulation etc. I appreciate your
position, but perhaps you can sell the idea that using the best tool
for the job means that not everything should be done in pure SQL.

Simon
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bangalore | last post by:
Hi In reversing string usring recursive function, i found problems in using incremental postfix , and incremental prefix 1 void rev(char*); 2 void main() 3 { 4 char s="STRING"; 5 ...
1
by: Jimmy Chen | last post by:
Recently I've done a db2 backup and restore/recovery, but the process for recovering the database was different than what I thought to be. here is what I did: DB2 is set in online mode -...
0
by: Willem | last post by:
Based on MK's TSI_SOON (http://www.trigeminal.com/)I've created a nifty little procedure that - whenever you compact you db you get an incremental backup copy. Given that you have a table with...
6
by: Rudy Ray Moore | last post by:
I work with a multi-project workspace. One project (the "startup" project) has a "Configuration Type" of "Application (.exe)". The other 40 projects have a "Configuration Type" of "Static Library...
7
by: Michael Reinschmiedt | last post by:
Hello, setting the switch /clr significantly increased the linking time (ca. 18 min). The linker output shows "/incremental:no /fullbuild", when setting the switch /test. The same code linked in...
5
by: Joel Matthew | last post by:
My boss was asking about incremental backups. I was scratching my head, thinking that the transaction log and a backup policy (script) for each record set (sorry about the archaic terminology)...
1
yabansu
by: yabansu | last post by:
Hi all, I implemented a basic client application. It communicates with server and works properly. Building processes succeed just by giving the following warning: LINK : D:\DOC\Visual Studio...
8
by: Bern McCarty | last post by:
We have a large mixed dll that I can never seem to get to link incrementally. Below is the console output. For simplicity I've eliminated some stuff that we normally do when we really link this...
35
by: mwelsh1118 | last post by:
Why doesn't C# allow incremental compilation like Java? Specifically, in Java I can compile single .java files in isolation. The resulting individual .class files can be grouped into .jar files....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.