home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,655 of 19,505   
   Gene Wirchenko to esquel@sommarskog.se   
   Re: How to Get Local Variables That Are    
   30 May 12 13:31:40   
   
   From: genew@ocis.net   
      
   On Wed, 30 May 2012 20:50:24 +0200, Erland Sommarskog   
    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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca