Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #722

Re: Help for SQLServer Session Specific Global Variable

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Help for SQLServer Session Specific Global Variable
Date 2011-10-03 07:16 +0000
Organization Erland Sommarskog
Message-ID <Xns9F735E678B4A8Yazorman@127.0.0.1> (permalink)
References <98153dbd-72d4-41da-8e97-fb3f6c1ff710@z19g2000vby.googlegroups.com> <Xns9F72C795AB69AYazorman@127.0.0.1> <dc7b4f94-b02b-441f-8754-21a99ab8f8d8@g33g2000yqc.googlegroups.com> <Xns9F72D051A3E91Yazorman@127.0.0.1> <ded3f75c-2167-4877-ac37-b94825bdbecc@20g2000yqq.googlegroups.com>

Show all headers | View raw


Ender Karada? (enkaradag@gmail.com) writes:
> wat about: a real table with SESSIONID (int),DEPTNO (int).  for each
> connection, connection will insert one row to that two columned real
> table,
> so view will be like "select w.ID,w.NAME from worker w,mysessions m
> where w.DEPARTMENTNO=m.DEPTNO and m.SESSIONID=GET_SESSION_ID (watever
> for getcurrentsessionid)
> 
> or again for each connection, connection will insert one row to that
> two columned real table, view will be like
> "..m.DEPTNO=SOMEFUNCTIONTHATCALCULATESMYSESSIONDEPTNO()"

Then you need a means to clean them up. (Connections do not always die
in an ordered fashion.)
 
> or maybe i shall give up thinking about that

In honesty, I think the solutions you are looking at will give you more
headache that what you have now.



-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Help for SQLServer Session Specific Global Variable Ender Karadağ <enkaradag@gmail.com> - 2011-10-02 10:18 -0700
  Re: Help for SQLServer Session Specific Global Variable Ender Karadağ <enkaradag@gmail.com> - 2011-10-02 10:21 -0700
  Re: Help for SQLServer Session Specific Global Variable Erland Sommarskog <esquel@sommarskog.se> - 2011-10-02 19:37 +0200
    Re: Help for SQLServer Session Specific Global Variable Ender Karadağ <enkaradag@gmail.com> - 2011-10-02 10:56 -0700
      Re: Help for SQLServer Session Specific Global Variable Erland Sommarskog <esquel@sommarskog.se> - 2011-10-02 20:28 +0200
        Re: Help for SQLServer Session Specific Global Variable Ender Karadağ <enkaradag@gmail.com> - 2011-10-02 17:30 -0700
          Re: Help for SQLServer Session Specific Global Variable Erland Sommarskog <esquel@sommarskog.se> - 2011-10-03 07:16 +0000
            Re: Help for SQLServer Session Specific Global Variable Ender Karadağ <enkaradag@gmail.com> - 2011-10-03 08:57 -0700
              Re: Help for SQLServer Session Specific Global Variable Erland Sommarskog <esquel@sommarskog.se> - 2011-10-03 23:14 +0200

csiph-web