Solved

Reusing constant String declarations over several procedures

Posted on 2004-04-13
1
336 Views
Last Modified: 2008-03-06
Hi all,
I need to use a lot of constants in several procedures. Is there any way to reuse them without writing all of them in all my procedures?

I'm looking for something like the 'include' clause of C programs

TIA
David.
0
Comment
Question by:dgomezl
1 Comment
 
LVL 10

Accepted Solution

by:
bret earned 125 total points
Comment Utility
There really isn't anything like that built into the isql client.

However, why look for something "like" the c preprocessor?  Just use the c preprocessor itself - it really isn't specific to the c language itself and will do it's work on many other kinds of files.

Depending on your package, the c preprocessor is sometimes a standalone program, other times it is bundled into the c compiler.  However, there is usually an option to just run the preprocessor on the sourcefile and display the resulting output.

You could, for instance, keep your source in files with a ".sql" extention and "post-processed" with ".SQL".  You would transform the file and install the procedure by doing
something like

cc -E myprocedure.sql > myprocedure.SQL
isql -Usa -P -i myprocedure.SQL
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now