Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2008
    Posts
    6

    Unanswered: Can we create something similar to nested tables in T-SQL

    We can create collections or PL/SQL nested tables in oracle, is it possible to create nested tables in T-SQL/Watcom SQL.

    Regards,
    Varundeep Kaur

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    It will be useful if you post an example of PL / SQL so that we can see what you are referring to?

  3. #3
    Join Date
    Jan 2008
    Posts
    6
    PL/SQL tables are similar to arrays/structures where you can have integers or any character value as the index and there one key and one value.
    like

    collections[1].customer_code:=20;
    collections[1].customer_name:=varun';

    Then you can refer to value as collections[1].customer_code;

    Regards,
    Varundeep Kaur

  4. #4
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    interesting can u really store this in an oracle physical table?

  5. #5
    Join Date
    Jan 2008
    Posts
    6
    This is at logical level like temporary or hash tables in T-SQL, however we can store the data in physical table.

    Regards,
    Varundeep Kaur

  6. #6
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Oracle collections
    No, this is not available in Sybase. And it seems to me this kind of thing will just add unnecessary complications and bad code where people will write loops to increment a subscript instead of doing a join between 2 tables.
    Then again I've seen some bad code using a loop to retrieve values from the 2nd table.

  7. #7
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Quote Originally Posted by Varundeep
    This is at logical level like temporary or hash tables in T-SQL, however we can store the data in physical table.

    Regards,
    Varundeep Kaur
    Ok. I did have some experience working in PL SQL before but lost touch... What you are referring to is a close knit between PL/SQL and oracle. Its definitely not ANSI but its something more Oracle has accommodated in their PL/SQL... PL/SQL is definitely powerful than other tsql programs...

    What you are trying to achieve could be easily done in something in perl for eg., for Sybase. but not in TSQL... Please understand Oracle PL/SQL is their own extension of ANSI but not industry standards... They tried to make PL/SQL as a programming language (which is pretty close enuf I dont deny it), to get monopoly and dependency of their product but nothing else...

    So, you are going to have tough time finding equivalents when you program at other RDBMS

Posting Permissions

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