Teradata answer sheet properties using VBA RRS feed

  • Question

  • I am using VB to connect to Teradata and then executing a query and pasting its results in another excel. But, sometimes the no. of rows returned are huge. I want to set the teradata answer sheet properties using VB such that the query should fetch 5 rows only. I tried using Select Top 5, but it says that all expressions in a derived table must have an explicit name. Since, the no. of queries are huge, this isn't feasible.  I also don't want to get 5 rows after getting all the results and then cutting and pasting the top 5 rows. I wanna get 5 rows from the query only. Please help.
    Thursday, June 20, 2013 12:40 PM

All replies

  • I have not used Teradata but when I use Oracle I limit rows buy using SQL, row_number.  Found this:

    Thursday, June 20, 2013 2:32 PM
  • Hi Harendraa,


    For the issue itself, perhaps you can give this link a try:


    Good day.

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 28, 2013 9:47 AM