Insert same row multiple times

Hi,
I've this table TAB1:
COD.........TYPE........DESCRIP
1..............RED..............MY COLOR
I'd like to insert into table TAB2 this record 10000 times
How can I write my insert or procedure to insert this row multiple times?
Thanks in advance!

Hi,
Assuming tab1.col is unique:
INSERT INTO tab2 (col_a, col_b, col_c)
SELECT            cod,   type,  descrip
FROM    tab1
START WITH  cod = 1
CONNECT BY  cod = 1
       AND  LEVEL <= 10000;If tab1.cod is not unique, use whatever is unique in the START WITH and CONNECT BY clauses. You do not have to SELECT the unique key.
This does not assume that tab1 contains only the row you want to copy.
As shown, this only works for making multiple copies of a single row.
The multi-row version isn't much more complicated.

Similar Messages

  • How to insert same record multiple times in a loop..

    Dear All,
    I need to insert a record multiple time how it can be accomplish...
    eg:
    ref no name dept
    123     abc 1     
    122 def 2
    121 feg 1
    120 hhh 2
    while inserting into another table:
    all dept no 1 with should inserted 3 times for each record above
    final out put should be :
    table abc
    ref no name dept
    123     abc 1
    123     abc 1
    123     abc 1     
    122 def 2
    121 feg 1
    121 feg 1
    121 feg 1
    120 hhh 2
    Thank You

    user3029023 wrote:
    Dear All,
    I need to insert a record multiple time how it can be accomplish...
    eg:
    ref no name dept
    123     abc 1     
    122 def 2
    121 feg 1
    120 hhh 2
    while inserting into another table:
    all dept no 1 with should inserted 3 times for each record above
    final out put should be :
    table abc
    ref no name dept
    123     abc 1
    123     abc 1
    123     abc 1     
    122 def 2
    121 feg 1
    121 feg 1
    121 feg 1
    120 hhh 2
    Thank YouTry this .
    SQL> ed
    Wrote file afiedt.buf
      1  with t as
      2  (select '123' AS ref_no,'abc' AS name,'1' as Dept
      3  from dual
      4  union all
      5  select '122','def','2' from dual
      6  union all
      7  select '333','feg','1' from dual
      8  union all
      9  select '120','hhh','2' from dual
    10  )
    11  select ref_no,name,Dept from t,(select level x from dual connect by  level <4)
    12* order by 1
    SQL> /
    REF NAM D
    120 hhh 2
    120 hhh 2
    120 hhh 2
    122 def 2
    122 def 2
    122 def 2
    123 abc 1
    123 abc 1
    123 abc 1
    333 feg 1
    333 feg 1
    333 feg 1
    12 rows selected.And insert the same onto your desired table.
    Hope this Helps..
    Regards,
    Achyut

  • Problem returning same rows multiple times

    Hi there. I have three tables called GP_T, LDMK_T, and FP_T.
    GP_T is a spatial table and has the following attributes:
    Location | Land - where location is of type sdo_geometry
    LDMK_T has the following attributes:
    Land | CFCC
    FP_T has the following attributes:
    Land | CFCC | Score
    Each land is assoicated with only one location. As can be seen the attribute "Land" is common to all three tables and uniquely identifies the objects that I am trying to access. "CFCC" is common to LDMK_T and FP_T and each unique object has an associated "CFCC" where more than one object can have the same "CFCC". Essentially what I am trying to do is return all distinct "lands" based on a "CFCC" value and where the objects' score > 20.
    My select statement looks as follows:
    select a1.land, a1.location from GP_T a1, LDMK_T a2, FP_T a3
    where a1.land = a2.land and a1.land = a3.land and a2.cfcc = a3.cfcc
    and a2.cfcc = 'D43' and a3.feature_score > 20;
    However, this query returns certain objects multiple (2 or more) times. When I run this second query it appears to return the correct number of values but without the "Location" attribute:
    select distinct (a1.land) from GP_T a1, LDMK_T a2, FP_T a3
    where a1.land = a2.land and a1.land = a3.land and a2.cfcc = a3.cfcc
    and a2.cfcc = 'D43' and a3.feature_score > 20;
    I cannot use "select distinct a1.land, a1.location...." as it throws up the following error:
    ORA-22901: cannot compare nested table or VARRAY or LOB attributes of an object type
    Is it a question of using GROUP_BY or can anybody else see anything wrong with the way I set up the initial query. Any help would be greatly appreciated. Joe

    Hi there. Thanks a lot for your response. I tried removing the second table completely from the query as you suggested, seeming as it appears redundant, but the query still retrieves certain rows multiple times. In fact the query that you suggested actually returns the exact same results as my initial query so at least some progress has been made. However, I really have no idea how to remove duplicates without using the "DISTINCT" option. Has anybody else got any further suggestions? Any help would be great. Thanks, Joe

  • Avoid opening same Form Multiple times

    hi
    Can anyone help me , how to put restruction not to open the same form multiple times .
    regds/sanjay

    I'm not suggesting that the following is great idea but..
    You could start a timer and keep updating the row in the table with a timestamp and then have a job which checks if there are rows in the table that have timestamps older than the timer interval.
    I actually think that that is really bad idea.
    I think its more important to ask why this is a requirement? I currently write sytems for police officers and even they can grasp the concept that someone else might be updating the same data at the same time as them and can work multiple sessions. Its hard for them, and sometimes I think they may just be hitting their keyboards with a truncheon, but they do get it.

  • Why is Apple TV showing the same computer multiple times for Home Sharing?

    Why is my Apple TV showing the same computer multiple times for Home Sharing? Also have connectivity issues. Sometimes will lose signal.
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    I recently updated to Yosemite and never had this issue before.

    I'm not 100% sure of the ins and outs, but it's some sort of known issue between Yosemite, Airport and wifi. All you can do is wait for a fix and keep restarting your equipment as and when needed, unless you have the ability to connect your Mac via ethernet.

  • Can I gift the same app multiple times to multiple users?

    Can I gift the same app multiple times to multiple users?
    Like, if I wanted to buy iMovie for 3 friends, could I buy the app as a gift 3 times?

    You should be able to gift it multiple times
    Gifting content : http://support.apple.com/kb/HT2736

  • Is it possible to copy the same database multiple times simultaneously?

    This is the setup of my environment.
    I have a 'master' database that contains the full schema plus some pre-populated data such as default settings. When database schema changes are made, they get made to the master database. When a new customer signs up for the service, I make a copy of this
    master database (using SMO) that will now be the database containing all of the customer's information. The database is rather large, and the copy operation can take a couple minutes.
    Everything works fine as expected, unless I try to provision two new customers at the same time. It appears that Azure only allows for one DB copy operation at a time. Is there a way to allow for copying the same database multiple times simultaneously?
    Thanks for you input. I understand that this is likely not the optimal setup, and that there is many better ways of doing this, but I am somewhat heavily invested in the current process and I would like to find out how to make it work if I can.

    BTW, you can do this programatically by using PowerShell (https://msdn.microsoft.com/en-us/library/ee210569.aspx), SqlPackage (http://www.benday.com/2012/12/18/deploy-a-sql-server-database-projects-dacpac-with-sqlpackage-exe/)
    or the SQL Server binaries for .NET (http://www.vijayt.com/Post/Deploying-a-data-tier-application-in-SQL-Azure-programatically)
    Hope this helps.
    Alex

  • Same parameter multiple times in Execute SQL Task

    Hi all,
    i have a fairly long parametrized query that needs to be run within an Execute SQL task. It has only 2 unique parameters, but these need to be used multiple within that query. The connection is OLEDB.
    ill simplify my requirement by making up an arbitrary T-SQL "where" clause that will illustrate what i need:
    where
    x = @param1
    and y = @param1
    and z > @param2
    and w > @param2
    moving this into an SSIS execute SQL task will require the following:
    where
    x = ?
    and y = ?
    and z > ?
    and w > ?
    I know i need to specify 4 parameters and remap the same variables multiple times.. like so:
    User:aram1   -> 0
    User:aram1   -> 1
    User:aram2   -> 2
    User:aram2   -> 3
    isnt there a better way? i ask this because in my real task i have 2 params, each is reused 4 and 5 times respectively and it seems stupid to repeat params like this.

    @ _proffy_
    you can pass the same variable or value as parameter multiple times sql task.
    follow the steps below.
    1) type the sql query with parameters in SQL statement tab of sql task editor
    2. in the parameter mapping, select the variables.
      you can select the same variables more than once.
     give the parameter name as 0,1,2,3..... based on variables you require.
    do not forget to chooose the appropriate Datatype.
    ex:
    select * from table1
    where a= ?
    and b=?
    and c= ?
    parameters:
    Var name               param Name
    user::Var1               0   
    user::Var1               1
    user::Var2               2
    so the value becomes a=var1, b= var1 and c= var2

  • TS3276 how do I get Mail to stop downloading the same email multiple times?

    My mail keeps downloading the same email multiple times.  I've had as many as 10 of the same emial.  How do I stop this?

    Me too - did you ever figure it out?
    You can't even delete from the server in mountain lion.... I did it from my old mac, but it didn't work. I keep having 11,000 new emails that can not even be deleted in blocks!!!
    Was it a gmail account? Mine is, and my other 2 are fine...

  • How to automate saving the same image multiple times?

    Hello. I wish to save the same image multiple times in a folder... is there a way to automate this function? I also need the flexibility of determining the starting number in this image sequence. Thanks.

    Good day!
    I would recommend asking for help over at
    Photoshop Scripting
    And going into more detail about what you want to achieve (maybe post a screenshot, diagram, mock-up to illustrate it).
    Regards,
    Pfaffenbichler

  • Address book has same entries multiple times how can I go back to original cesium

    Address book has same entries multiple times how can I go back to original cesium

    After a couple of days, I'm noticing that the repeat(ing) offenders have more than 10 episodes, and seem to keep repeating them every time I sync.
    They only show once in my phone and in the iTunes Podcasts, but through iTunes and looking at what's in my phone is when I see the repeats.
    Even after I've marked a podcast as played, and deleted it from within my phone, as well as telling iTunes to delete the played episodes, it still shows multiples of the played episodes.
    There doesn't seem to be any rhyme or reason to it either. They aren't the newest ones either.

  • Running the same code multiple times with different paramters automatica​lly

    Hi guys,
    I want to run the same code multiple times with different paramters automatically. Actually, I am doing some sample scans which takes around 2 hours n then I have to be there to change the paramters and run it again. Mostly I do use folowing paramters only
    X_Intial, X_Final, X-StepSize
    Y_Intial, Y_Final, Y-StepSize
       Thanks,
    Dushyant

    All you have to di is put all of the parameters for each run into a cluster array. Surround your main program with a for loop and wire the cluster array through the for loop. A for loop will autoindex an input array so inside the for loop you just have to unbundle the cluster to get the parameters for each run.
    Message Edited by Dennis Knutson on 07-13-2006 07:50 AM
    Attachments:
    Cluster Array.JPG ‏9 KB

  • Provision same resource multiple times

    All,
    I have a scenario to provision same resource multiple times for the same user.
    How to make a resource to allow provisioning multiple times in OIM 11gR2. I am not seeing th option "allow multiple" in resource object in the design console.
    Please help.

    In OIM 11g R2 you can assign same resource multiple time.
    The account which gets assigned first time will be marked as primary and the rest others will be marked as "other"
    HTH

  • HT1689 Billed for same app multiple times

    We were billed for the same app multiple times, how do I contact apple iTunes to get this fixed?

    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
    iTunes Purchase Problems: How to Report a Problem to iTunes Support
    http://tinyurl.com/7tscpa7
    iOS: Troubleshooting applications purchased from the App Store
    http://support.apple.com/kb/TS1702?viewlocale=en_US&locale=en_US
    How to Get a Refund from the App Store
    http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
    Getting Refunds for your iTunes Store Purchases
    http://www.labnol.org/software/itunes-app-store-refunds/13838/
    Canceling a Digital Subscription
    http://gadgetwise.blogs.nytimes.com/2011/10/14/qa-canceling-a-digital-subscripti on/
     Cheers, Tom

  • Repeating the same region multiple times

    Hi,
    We have requirement where the same region gets repeated multiple times depending on the data.
    Functionally: QA -- Question Area , it has couple of questions
    Supplier1 has 1 QA assigned . Then in the page it gets displayed as
    - QA { ShowdetailHeader }
    -- Questions { tree table}
    Now that if Supplier1 is assigned with 3 QA's then
    - QA1
    -- Questions of QA1
    - QA2
    -- Questions of QA2
    - QA3
    -- Questions of QA3
    i.e the regions to be displayed will depend on the data.
    ================================
    To explain the same tech...
    We have the following requirement { Consider 2 VO's and a VL between them }. In the page we display it in this manner
    <showdetialHeader VO1>
    < Tree table VO2 >
    This region will be repeated depending on the result of VO1. That is say VO1 returns 3 rows then it should be displayed as
    <showdetialHeader VO1.row1>
    < Tree table VO2 [VO1.row1] >
    <showdetialHeader VO1.row2>
    < Tree table VO2 [VO1.row2]>
    <showdetialHeader VO1.row3>
    < Tree table VO2 [VO1.row3]>
    =========================================================
    Please guide me in I building this page.
    Thanks,
    Suresh.
    Edited by: user758041 on Dec 27, 2010 3:11 AM

    Hi,
    JDeveloper 11g does not yet support dynamical creation of ADF Region instances. So any attempt to create a region in an af:forEach or af:iterator loop wont work.
    Frank

Maybe you are looking for

  • What is the purpose of GL account in the account assignment tab of PO scree

    hi, in the purchase order screen, in the account assignment tab, there is a field labelled as GL account. May i know what is the purpose of this gl account because as far as i am concerned we need to specify the vendor gl account (in the vendor maste

  • Error occured when using flash 9 in firefox

    I installed Flash CS3 Professional (trial) for doing assignment. After that, I think flash player also be upgraded to version 9. It's no problem in IE, but when browsing website with using firefox, it keeps pop up windows which ask "Where is the debu

  • After installing SP2, reconnected mailbox take 24+ hours to become available

    The other day, we install SP2 on our 1 back-end and 2 front-end Exchange 2010 servers.  All are on 2008 R2.  After SP2 was installed, if we want to reconnect a deleted/disconnected mailbox, it lets us without issue.  However, when we try to access th

  • Reverse Date in YYYYMMDDHHMMSS format.

    Hi I want system date in YYYYMMDDHHMMSS format...

  • Who would benefit from Forte?

    Ari Singh wrote a provocative piece questioning the benefits of Forte in "Windows only", non-large scale applications. Rather than get into a large philosopical discussion, I would like to illustrate my point with an example taken from a current Fort