Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Location
    India
    Posts
    25

    Unanswered: User Defined Data Type & Table Variable

    Hi,

    I defined a new data type.
    In my sp, I am using a table variable. Like

    DECLARE @TEMP_TBL TABLE
    (te_ID INTEGER IDENTITY, col_name my_data_type)

    But it is giving error..
    what could be the problem?

    Selva Balaji.

  2. #2
    Join Date
    Dec 2001
    Location
    Delhi/Bangalore, India
    Posts
    74
    Syntactically nothing seems to be wrong at first glance.

    What is the error you are getting? Did you use "my_data_type" correctly?

  3. #3
    Join Date
    Dec 2001
    Location
    India
    Posts
    25
    Hi,

    I already defined the data type "t_varchar_15"

    The following is the sample sp.

    create procedure test
    as
    begin
    DECLARE @tmp_TBL TABLE(empno t_varchar_15)
    insert into @tmp_tbl select empno from employee
    select * from @tmp_tbl
    end
    go

    The Error is
    Column or parameter #1: Cannot find data type t_varchar_15.

    Selva Balaji

Posting Permissions

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