read from a temporary table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tess1
    New Member
    • Jul 2007
    • 2

    read from a temporary table

    Hi,
    How can I reed a value from a temporary table from within a function?
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by tess1
    Hi,
    How can I reed a value from a temporary table from within a function?
    Can you explain what you mean for temporary table?
    Because for all tables same Query will acceptable.

    Comment

    • tess1
      New Member
      • Jul 2007
      • 2

      #3
      Originally posted by hariharanmca
      Can you explain what you mean for temporary table?
      Because for all tables same Query will acceptable.

      I have this function :
      CREATE FUNCTION [DBO].[f1]
      ( )
      RETURNS BIT AS
      BEGIN
      SELECT c1 FROM #xTemp
      END


      #xTemp has creeted before execute this function f1 and I cannot creat it within the function

      Comment

      • hoomaniraji
        New Member
        • Jul 2007
        • 10

        #4
        Originally posted by tess1
        I have this function :
        CREATE FUNCTION [DBO].[f1]
        ( )
        RETURNS BIT AS
        BEGIN
        SELECT c1 FROM #xTemp
        END


        #xTemp has creeted before execute this function f1 and I cannot creat it within the function
        i think if you use them in the same transaction.you have no problem.of course if you must use two transaction then set the 'transaction isolation level' to ''dirtyread".

        Comment

        • leela mn
          New Member
          • May 2007
          • 43

          #5
          No you cant access the temporary tables in functions

          Comment

          Working...