Solved

Reusing constant String declarations over several procedures

Posted on 2004-04-13
1
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
bret earned 125 total points
ID: 10813523
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The goal of this blog is to: > note what has impeded us from reaching effective life on-call > provide 3 steps to mastering life on-call > highlight what will be achieved with effective life on-call
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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