473,748 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2943
st**********@ya hoo.com (Steve) wrote in message news:<6f******* *************** ***@posting.goo gle.com>...
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
1797
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 rev(s);
1
3482
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 - backup - * backup db2 in full * insert record
0
3144
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 version information you get incremental backups on a per-version basis. SEE CODE BELOW Basic idea is: start TSISOON with the options: 1. "compact this db"
6
6563
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 (.lib)". My question: Should the linker incrementally link when I make a change to one of the ..cpps in one of my .lib projects? For VC6 the answer is yes.
7
3527
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 less than 1 minute without the /clr switch. Is it possible to use incremental linking when specifying the /clr switch? The executable is currently a 15MB monster executable. Would it help to break up the code into DLL's? Thank you.
5
3612
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) was the usual solution. But there is a some resistance against writing more code, so I'm wondering what the current state of affairs with postgresql in regards to incremental backup would be. A quick search of the lists produced the following:
1
22087
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 2005\Projects\Client01\Debug/Client01.exe not found or not built by the last incremental link; performing full link This warning occurs when building/rebuilding the project after cleaning the intermediate and output files. If the project is once...
8
2488
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 dll like manifest embedding and strong name delay signing. Can anyone see anything wrong with my link command? Or offer some other explanation why I can never get an incremental link out of it? To test, I'm just touching one of the source files so...
35
3048
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. In C#, there appears to be no analog. I have to compile all my .cs files into a single .dll. This has serious drawbacks in terms of compilation. With Eclipse, I change a file and only that file is re-compiled. With Visual Studio, I
0
8822
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9528
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9236
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.