Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8501717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:17:12+00:00 2026-06-11T01:17:12+00:00

I am a beginner in Oracle. I created the table type as like as

  • 0

I am a beginner in Oracle. I created the table type as like as follows:

TYPE metertable IS TABLE OF pseb.metermaster.meterid%type;

I dnt know how to insert the value into that table type. I need to store the whole resultset of the following query into the table type.

select  distinct(meterid) 
from pseb.consumerfeedermetermapper 
where feederid in (select distinct (fm.FeederID) 
                   from pseb.feedermaster fm,pseb.consumerfeedermetermapper cfm
                   where fm.substationid=v_v_type
                   and cfm.feederid=fm.feederid
                   and cfm.FeederID>0)
 and meterid >0
 order by meterid;

Help me to do that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:17:14+00:00Added an answer on June 11, 2026 at 1:17 am

    Use BULK COLLECT to select the data into a variable of that type:

    declare
      mt metertable;
    begin
      select  distinct(meterid) 
      bulk collect into mt
      from pseb.consumerfeedermetermapper 
      where feederid in (select distinct (fm.FeederID) 
                         from pseb.feedermaster fm,pseb.consumerfeedermetermapper cfm
                         where fm.substationid=v_v_type
                         and cfm.feederid=fm.feederid
                         and cfm.FeederID>0)
      and meterid >0
      order by meterid;
    
      -- Now use mt...
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question : Beginner Level Code: Pure Javascript I had created a web page in
I am beginner in Oracle database system. As I noticed, it is possible to
Am working on web Services... and am a beginner, Am trying to get Oracle
Beginner programmer here....hope it makes sense :) I have created a console app that
Beginner here: In this answer to my question of how to insert data into
Does anyone know of a good link that has a listing of the Oracle
Total beginner with PHP: I have an form based on table data that the
I'm developing an app using Oracle 11g and ODP.NET, C# and I'm a beginner
I am learning oracle and i am beginner. Please solve my following error. create
I am quite a beginner when it comes to Oracle. I am having trouble

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.