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


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

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 23:14 +0200
Organization Erland Sommarskog
Message-ID <Xns9F73EC75E6831Yazorman@127.0.0.1> (permalink)
References (2 earlier) <dc7b4f94-b02b-441f-8754-21a99ab8f8d8@g33g2000yqc.googlegroups.com> <Xns9F72D051A3E91Yazorman@127.0.0.1> <ded3f75c-2167-4877-ac37-b94825bdbecc@20g2000yqq.googlegroups.com> <Xns9F735E678B4A8Yazorman@127.0.0.1> <9e865eee-7b71-45e9-a99c-58ded5bb81f3@y18g2000yqy.googlegroups.com>

Show all headers | View raw


Ender Karada? (enkaradag@gmail.com) writes:
> after that i created a view like "select ID,NAME from worker where
> DEPTNO=GETMYSESSIONDEPTNO()" (GETMYSESSIONDEPTNO() is an sql function
> that returns related DEPTNO value in history table)
 
A word of warning: data access from user-defined functions can cause
serious performance problem. This one looks innocent, but you should
certainly be careful with using functions all over the place.


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

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious 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