Re: Col_Name is not reporting from temp table...
From: Aaron Bertrand [MVP] (aaron_at_TRASHaspfaq.com)
Date: 04/04/04
- Next message: Aaron Bertrand [MVP]: "Re: Col_Name is not reporting from temp table..."
- Previous message: Tenaya: "Re: contactination string results in a null value"
- In reply to: JDP_at_Work: "Re: Col_Name is not reporting from temp table..."
- Next in thread: Aaron Bertrand [MVP]: "Re: Col_Name is not reporting from temp table..."
- Reply: Aaron Bertrand [MVP]: "Re: Col_Name is not reporting from temp table..."
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 4 Apr 2004 17:47:43 -0400
Let me ask again: Where does Books Online use functions like COL_NAME()
against a temp table? (Note: COL_NAME() != OBJECT_ID())
"JDP@Work" <JPGMTNoSpam@sbcglobal.net> wrote in message
news:%23qcMoheGEHA.4084@TK2MSFTNGP11.phx.gbl...
>
>
> Right to here......
>
> Transact-SQL Reference
>
> OBJECT_ID
> Returns the database object identification number.
>
> Syntax
> OBJECT_ID ( 'object' )
>
> Arguments
> 'object'
>
> Is the object to be used. object is either char or nchar. If object is
char, it
> is implicitly converted to nchar.
>
> Return Types
> int
>
> Remarks
> When the parameter to a system function is optional, the current database,
host
> computer, server user, or database user is assumed. Built-in functions
must
> always be followed by parentheses.
>
> When specifying a temporary table name, the database name must precede the
> temporary table name, for example:
>
> SELECT OBJECT_ID('tempdb..#mytemptable')
> System functions can be used in the select list, in the WHERE clause, and
> anywhere an expression is allowed. For more information, see Expressions
and
> WHERE.
>
> Examples
> This example returns the object ID for the authors table in the pubs
database.
>
> USE master
> SELECT OBJECT_ID('pubs..authors')
> Here is the result set:
>
> -----------
> 1977058079
>
> (1 row(s) affected)
>
> See Also
>
> Metadata Functions
>
> ©1988-2000 Microsoft Corporation. All Rights Reserved.
>
>
> "Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
> news:OdZJvoZGEHA.2664@TK2MSFTNGP11.phx.gbl...
> > WHere does Books Online use functions like COL_NAME() against a temp
table?
> >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > http://www.aspfaq.com/
> >
> >
> > "JDP@Work" <JPGMTNoSpam@sbcglobal.net> wrote in message
> > news:ebV3jaZGEHA.2612@TK2MSFTNGP09.phx.gbl...
> > > Then why would BOL use that example?
> > >
> > > TIA
> > >
> > > JeffP....
> > >
> > >
> > > "Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
> > > news:O0$xXAYGEHA.3188@TK2MSFTNGP10.phx.gbl...
> > >> > I might assume that the ID is valid but that col_Name may look to
the
> > >> > local
> > >> > database rather than the tempdb.
> > >>
> > >> Yes, I believe I said that is what happens...
> > >>
> > >> --
> > >> Aaron Bertrand
> > >> SQL Server MVP
> > >> http://www.aspfaq.com/
> > >>
> > >>
> > >
> > >
> >
> >
>
>
>
- Next message: Aaron Bertrand [MVP]: "Re: Col_Name is not reporting from temp table..."
- Previous message: Tenaya: "Re: contactination string results in a null value"
- In reply to: JDP_at_Work: "Re: Col_Name is not reporting from temp table..."
- Next in thread: Aaron Bertrand [MVP]: "Re: Col_Name is not reporting from temp table..."
- Reply: Aaron Bertrand [MVP]: "Re: Col_Name is not reporting from temp table..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|