Professional Web Applications Themes

Reviewing #temp table datatypes - Microsoft SQL / MS SQL Server

Try SELECT COL_LENGTH('tempdb..#export', 'hrs') HTH, Srinivas Sampangi  table using the  basically, how do I ...

  1. #1

    Default Reviewing #temp table datatypes


    Try

    SELECT COL_LENGTH('tempdb..#export', 'hrs')

    HTH,
    Srinivas Sampangi 
    table using the 
    basically, how do I 
    sampangi Guest

  2. #2

    Default Re: Reviewing #temp table datatypes

    This looks great. Only, I've not really succeeded in getting the datatype
    info I'm after. Specifically, I want to know if a row got defined as an Int,
    or Decimal(6,2), etc..

    Any advise?

    Jason

    "sampangi" <com> wrote in message
    news:06e101c361d9$626a0a60$gbl... 
    > table using the 
    > basically, how do I [/ref]


    Jason Guest

  3. #3

    Default Re: Reviewing #temp table datatypes


    does this help?

    use tempdb
    go
    sp_help #export

    Srinivas Sampangi
     
    getting the datatype 
    defined as an Int, [/ref][/ref]
    temp 
    >> basically, how do I [/ref]
    >
    >
    >.
    >[/ref]
    sampangi Guest

  4. #4

    Default Re: Reviewing #temp table datatypes

    Nope. I get errors whenever I try sp_help against temp tables. Hmmm. Any
    other ideas?

    Jason

    "sampangi" <com> wrote in message
    news:05dd01c361e0$1d51e220$gbl... 
    > getting the datatype 
    > defined as an Int, [/ref]
    > temp 
    > >
    > >
    > >.
    > >[/ref][/ref]


    Jason Guest

  5. #5

    Default Re: Reviewing #temp table datatypes


    What do you mean by "reviewing datatypes"? Do you just
    want to see the data types of columns of a temp table that
    is created as a result of some select..into ?
    I tried this in Query yser.It workds for me

    create table export(col1 Int)
    select *
    into #export
    from export

    use tempdb
    go
    sp_help #export

    --
    Srinivas Sampangi
     
    tables. Hmmm. Any 
    >> getting the datatype [/ref][/ref]
    got 
    >> temp [/ref][/ref]
    ('tempdb..#export'), 'hrs') [/ref]
    >
    >
    >.
    >[/ref]
    sampangi Guest

  6. #6

    Default Re: Reviewing #temp table datatypes

    I must have been doing something wrong. It is working. Thanks! - Jason

    "sampangi" <com> wrote in message
    news:07f501c361e6$0fd38a80$gbl... 
    > tables. Hmmm. Any [/ref]
    > got [/ref]
    > ('tempdb..#export'), 'hrs') 
    > >
    > >
    > >.
    > >[/ref][/ref]


    Jason Guest

Similar Threads

  1. Temp table help...
    By trtpravin@yahoo.com in forum Informix
    Replies: 1
    Last Post: September 26th, 10:26 PM
  2. Is there any way to loop a temp table or table variable without cursor?
    By Lawrence in forum Microsoft SQL / MS SQL Server
    Replies: 7
    Last Post: August 9th, 08:25 PM
  3. create temp table with no log
    By cathy wang in forum Informix
    Replies: 11
    Last Post: July 9th, 08:42 PM
  4. insert into temp table
    By Dhiren_Dave@ril.com in forum Informix
    Replies: 0
    Last Post: June 26th, 05:30 AM
  5. SQL - getting rowid into a temp table [368]
    By ART KAGEL, BLOOMBERG/ 65E 55TH in forum Informix
    Replies: 0
    Last Post: June 24th, 07:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139