Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1093
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: How to Get Local Variables That Are Not So Local |
| Date | 2012-05-30 13:31 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <4a0ds7dikohq660ad1qjghnfcqnsr85r57@4ax.com> (permalink) |
| References | <et1bs791hjssp3ppig64cnn1ufg2qgciu7@4ax.com> <XnsA0635EF73D48FYazorman@127.0.0.1> <p4kcs7pr11ldmtrgpmk5p5i6hsdnf6ofrk@4ax.com> <XnsA063D3FF1B300Yazorman@127.0.0.1> |
On Wed, 30 May 2012 20:50:24 +0200, Erland Sommarskog
<esquel@sommarskog.se> wrote:
>Gene Wirchenko (genew@ocis.net) writes:
>> I am using it to set up a database. I think that it is intended
>> for that. It still is missing things that surprise me.
>
>Not really. The database consists of source code which should be under
>version control. Handling of files is outside the scope of T-SQL.
I am not using source control yet (and might not). I am creating
my database with a script. As I will have to export it to another
site, that seems to be the easiest way to implement it. I have been
doing something similar with the existing system.
>> I did solve my problem by creating/dropping a temporary table to
>> create a kludgy but working flag. Script-level variables would be
>> much easier.
>
>Script? Session-level possibly. A script is only something you have on
>file, but SQL Server sees only one batch at a time.
Yes, I know how it is about batches. I wish it were otherwise.
Am I missing a nuance regarding script vs. session? Script-level
would be less than session-level and quite possibly unwanted. (I run
scripts expecting a clean start in the session. If I had to worry
about variables surviving from a previous execution in the session, it
would be bit messier, especially considering that that previous
execution might have been of the script that I am developing and it
did not do what I wanted.) Variables being tossed at end of script
execution is fine with me. Others might disagree. Fine with me if a
command to clear all variables is provided.
>> I want something that I can use in SSMS. Anything else will be a
>> rougher ride by just the fact of having to use more than one tool.
>
>Why would it be a rougher ride to have your computer running two programs
>running simultaneously. Multi-tasking is quite an old concept by now.
Let me see. I want to do something to my database. What
language should I write the script in? Later... oops! I want to do
something that the language I picked does not support. Recode. Yuck.
I would prefer it if T-SQL had some more of those things that
general purpose languages have. I might be different in this regard,
but I would like the functionality, even if it ends up being a bit
slower. Arrays would be nice. I am not the only one who misses them.
YMMV. I might also being shouting into the wind as far as
Microsoft ever doing anything about them.
Sincerely,
Gene Wirchenko
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
How to Get Local Variables That Are Not So Local Gene Wirchenko <genew@ocis.net> - 2012-05-29 19:55 -0700
Re: How to Get Local Variables That Are Not So Local Erland Sommarskog <esquel@sommarskog.se> - 2012-05-30 07:20 +0000
Re: How to Get Local Variables That Are Not So Local Gene Wirchenko <genew@ocis.net> - 2012-05-30 09:56 -0700
Re: How to Get Local Variables That Are Not So Local Erland Sommarskog <esquel@sommarskog.se> - 2012-05-30 20:50 +0200
Re: How to Get Local Variables That Are Not So Local Gene Wirchenko <genew@ocis.net> - 2012-05-30 13:31 -0700
Re: How to Get Local Variables That Are Not So Local Erland Sommarskog <esquel@sommarskog.se> - 2012-05-31 07:23 +0000
Re: How to Get Local Variables That Are Not So Local rja.carnegie@gmail.com - 2012-06-14 04:20 -0700
Re: How to Get Local Variables That Are Not So Local Erland Sommarskog <esquel@sommarskog.se> - 2012-06-14 21:43 +0200
Re: How to Get Local Variables That Are Not So Local Gene Wirchenko <genew@ocis.net> - 2012-06-14 14:58 -0700
csiph-web