problem with creating a logical sequence

create table t (a varchar2 (20), b number (8));
insert into values t ('aa', 4);
insert into values t ('ba', 6);
Insert values into t ('ca', 7);
insert into values t ('da', 8);


instead of 8, it can be any number between 1 and 100

If instead of number 8 is < 10
Insert into t values('ea',10); -what I need dynamic insertion

If instead of the number between 11-19 then
Insert into t values('ea',20); -what I need dynamic insertion


and so on


I tried like below
Select case when max (b) < 10 then 10 when max (b) between 10 and 20, then 20 end of t;

but I can not write the case for again and again up to nth

Insert into t ("ea" ceil ((select max (b) from t) / 10)) * 10);

Tags: Database

Similar Questions

  • Problem with create table as select (DEC)

    Hello

    We try to data cleaning of huge tables. And a customer of guise is reanme main table to the backup table. Then create a master table in select * backup table with some test.

    Now the problem with create table select, is that it creates the table without indexes and constraints. Is it possible to use the ETG (create the select table) with the same structure that he was the (all index, constriaints).

    Or any other solution to solve this problem?

    Thanks in advance

    Sweety wrote:
    Hello

    We try to data cleaning of huge tables. And a customer of guise is reanme main table to the backup table. Then create a master table in select * backup table with some test.

    Now the problem with create table select, is that it creates the table without indexes and constraints. Is it possible to use the ETG (create the select table) with the same structure that he was the (all index, constriaints).

    Or any other solution to solve this problem?

    Thanks in advance

    No, this is not possible. You need to get the manuscript of dependent object and create it manually.

  • Problem with creating a sequence

    Hello

    I'm having a problem with a sequence that I am creating. Basically, I'm trying to create a sequence with a default value based on the value in another table, i.e.
    CREATE SEQUENCE seq
    START WITH (
                min(customer_id) from customer
                )
    INCREMENT BY 1;
    Is this possible? I get errors.

    You can use dynamic sql or, if you use SQL * more take advantage of substitution variables:

    SQL> DROP SEQUENCE seq
      2  /
    DROP SEQUENCE seq
                  *
    ERROR at line 1:
    ORA-02289: sequence does not exist
    
    SQL> DECLARE
      2      stmt VARCHAR2(1000);
      3  BEGIN
      4       SELECT  'CREATE SEQUENCE seq START WITH ' || min(empno)
      5         INTO  stmt
      6         FROM  emp;
      7       EXECUTE IMMEDIATE stmt;
      8  END;
      9  /
    
    PL/SQL procedure successfully completed.
    
    SQL> SELECT seq.NEXTVAL FROM dual
      2  /
    
       NEXTVAL
    ----------
          7369
    
    SQL> DROP SEQUENCE seq
      2  /
    
    Sequence dropped.
    
    SQL> COLUMN s NEW_VALUE s NOPRINT
    SQL> SELECT  min(empno) s
      2    FROM  emp
      3  /
    
    SQL> CREATE SEQUENCE seq START WITH &s;
    old   1: CREATE SEQUENCE seq START WITH &s
    new   1: CREATE SEQUENCE seq START WITH       7369
    
    Sequence created.
    
    SQL> SELECT seq.NEXTVAL FROM dual
      2  /
    
       NEXTVAL
    ----------
          7369
    
    SQL> 
    

    SY.

  • Problems with masks after the sequence first SpeedGrade back (CC)

    Hello

    I'm color ranking a clip in SpeedGrade CC using the new direct link function. For calibration of the colors I used masks and also the different layers. Once I'm done, I sent my sequence back to first Pro CC.

    I see, first shows me exactly the color correction, I did in SpeedGrade, except for one thing:
    The places where I used the masks in SpeedGrade to illuminate their for example a little until now are filled with lines pixeled...
    I thought it's just a problem with the preview, so I exported it. Slept pixeled lines.

    Once again: in SpeedGrade is all fine, but when I send the return sequence to the first there are those pixels.

    It's really irritating because one day before it worked fine with no problems and I was virtually the same as now.

    Please help me if you can! Thank you!

    Ok.

    The GPU acceleration is turned on?  Have you tried to turn it off?  You have a card AMD or nVidia?

  • Problem with creating, truncating and deleting a database in 1 transaction

    Hello

    I came across a problem when it is in the same transaction creating a data base, truncating it and then delete it. Do these 3 things causes the following transaction validation to last forever.
    The following code causes the problem:

    File envHome = new File ("truncate-delete-test");
    envHome.mkdirs ();
    EnvironmentConfig envConfig = EnvironmentConfig.DEFAULT;
    envConfig.setAllowCreate (true);
    envConfig.setTransactional (true);
    envConfig.setTxnSerializableIsolation (true);
    Environment = environment (this.envHome, envConfig);

    Transaction txn = this.environment.beginTransaction (null, TransactionConfig.DEFAULT);

    DbConfig DatabaseConfig = new DatabaseConfig();
    dbConfig.setAllowCreate (true);
    dbConfig.setTransactional (true);
    String dbName = "test-db";
    Database db = this.environment.openDatabase (txn, dbName, dbConfig);

    CBI Close();
    environment.truncateDatabase (txn, dbName, false);
    DB = this.environment.openDatabase (txn, dbName, dbConfig);

    CBI Close();
    this.environment.removeDatabase (txn, dbName);

    TXN.Commit (); <-this statement would never return.

    I encountered this problem with version 4.0.92. I've updated to 4.1.7 but the problem still exists.
    Also, it manifests when the records are written to the database before and after it truncate.

    Looking in the process with the debugger shows the following stack trace during the commit endless happens:

    [...]
    DbTree.deleteMapLN (DatabaseId) line: 1069
    DatabaseImpl.finishDeleteProcessing (line): 1164
    Txn.cleanupDatabaseImpls (boolean) line: 1404
    TXN.Commit (durability) line: 728
    TXN.Commit (line): 549
    Transaction.Commit (line): 227
    [...]

    Depending on where I stop the process, there are additional calls on top of the stack.

    Exit Registration unfortunately does not help here, as the log messages stopped once the problem started to appear.

    Is it somehow not allowed to create, truncate and delete a database in the same transaction? I couldn't find anything in this sense in the documentation, and it is no exception either.
    Or have I came across a bug in I here?

    Thanks in advance for any advice or solutions.

    Christoph
  • Problem with creating a new line in widget glossary

    I use 6 Captivate and have a problem with trying to display text on a new line in the description field of the widget glossary. In playback mode, a carriage return displays form \n

    I read in another discussion (from early last year), that this problem had been resolved and that the fix would be communicated soon on the blog of captivate for users without a subscription. Anyone know if the fix has been shared yet - I can't find it anywhere?

    Thanks for any help you can provide.

    Tenneil

    Hi Tenneil,

    Greetings from Adobe.

    Please click on the link below and download the Interaction of Glosarry updated.

    https://files.Acrobat.com/a/preview/0a17bb28-049e-4AC7-b8f7-dbdacef5e91c

    1. Extract the zip to your desktop.
    2. Copy "08_Glossary.wdgt" into the extracted zip file.
    3. Go to: C:\Program Files (x 86) \Adobe\Adobe Captivate 6 (32 bit) \Gallery\Interactions (for 32-bit Captivate) or C:\Program Files\Adobe\Adobe Captivate 6 (64-bit) \Gallery\Interactions (for 64-bit Captivate).
    4. Replace the glossary widget in the record of the interaction. Restart the Captivate 6. (Make sure you take the backup of the original Glosarry Widget)
    5. Ask the widget again and check the issue.

    Let me know if it works for you.

    Kind regards

    MILIN

  • Problems with creating an image mask!

    I have problems with the creation of an image mask. I tried jpg and psd as alpha channel (black and white), but it seems that there is a bug. I also tried a mask "trace" (or whatever it is called in English - I use the German version) but it doesn't work either. Someone has any idea how to solve this problem? Thanks in advance

    You can use JPEG, just set it to Luma Matte. Make sure the mask is white pure for a clean mat.

    If its black set the market back.

  • ORA-29855 problem with creating an index

    Hi all,

    I am trying to create an index, but I have this problem:

    SQL > CREATE INDEX ITALIA_NODE_IDX ON ITALIA_NODE$ (GEOMETRY) INDEXTYPE IS MDSYS. SPATIAL_INDEX;
    CREATE INDEX ITALIA_NODE_IDX ON ITALIA_NODE$ (GEOMETRY) INDEXTYPE IS MDSYS. SPATIAL_INDEX
    *
    ERROR on line 1:
    ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
    ORA-13249: internal error in the Spatial index: [mdidxrbd]
    ORA-13249: error in the Spatial index: index build failed
    ORA-13249: error in the spatial index: [mdrcrtxfergm]
    ORA-13249: error in the spatial index: [mdpridxtxfergm]
    ORA-29400: data cartridge error
    ORA-01653: unable to extend table M2_10A70$ $.1024 by SPACE in tablespace USERS
    ORA-06512: a 'MDSYS. SDO_INDEX_METHOD_10I', line 10


    What do you think of this problem?
    Thank you in advance.
    Crystal

    Published by: crystal13 on June-18-2010 2.03

    Hello

    It looks like your USERS tablespace is small. You have no space left. Expand the size of the storage space by enlarging the file below or put a second to her, or put the tablespace mode AUTOEXTEND. See the guide administrators: http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tspaces.htm#i1010516

  • Problem with imported PluralEyes synchronized sequence

    Hey everybody,

    I'm trying to help a friend with a problem he has with a synchronized in first CS6 PluralEyes sequence import. I wonder if anyone has experience this problem before or can point in the right direction on where to start looking for the problem.

    It's the email explaining me the problem he sent:

    "Let me explain first of all the workflow." It is a heavy project to split into 3, corresponding to our three main characters. We'll be working on the 3 characters separately and then import our sequence published in the main project to create our great cut. The question is when we import the pluraleyes synchronized sequences of our project of character for the main project using the option 'import the sequence selected. " At first, it works very well and we can see our sequence synchronized pluraleyes in our new main project but suddenly, all the audio of these plur. sequence appears in red. not in mode offline, but in red and nothing plays.
    It seems I've found how to solve the problem by importing the whole project, but it will do to the eachtime the heavier project. For the workflow, it would be easier to work with the lighter weight of possible project and only import the selected sequence synchronized, necessary in the main project.

    We used the plural eyes 3.3 with adobe CS6 first. "

    If any of you can help me solve this I'd be very happy.

    Thank you

    Jack


    http://forums.Adobe.com/message/4778837#4778837

  • Problems with creating an exe file

    Hello

    I'm trying to convert a vi to an executable. When I run the constructor it comes up with an error:

    Visit ni.com/ask support request page to learn more about the resolution of this problem. Use the following as a reference:

    Error 8 has occurred to create a folder to create a directory Recursive.vi-> AB_Destination.lvclass:Create_Destination.vi-> AB_Build.lvclass:Create_Destinations.vi-> AB_Application.lvclass:Create_Destinations.vi-> AB_Build.lvclass:Build.vi-> AB_Application.lvclass:Build.vi-> AB_EXE.lvclass:Build.vi-> AB_Engine_Build.vi-> AB_Build_Invoke.vi-> AB_Build_Invoke.vi.ProxyCaller

    Possible reasons:

    LabVIEW: File permission error. You do not have the correct permissions for the file.

    C:\Users\builds

    I can't understand the permissions that he speaks. I even changed my program a public folder.

    Thank you

    In the build settings, you said to save the generation to a public folder?

  • Problem with the generation DB sequence by clicking on the button apply

    Hi gurus,

    I created the page used as in the example of the box tools tutorial, but I want to put the employee so he used to number id generation lost the sequence number when the Cancel button is clicked.

    So instead of the code in the EOImpl Create method

    public void create (AttributeList attributeList) {}

    Super.Create (AttributeList);

    Number of empnum = getOADBTransaction () .getSequenceValue ("FWK_TBX_EMPLOYEES_S");

    setEmployeeId (number);

    }

    I do in the method of setEmployeeId of EOImpl

    {} public void setEmployeeId (numeric value)

    If (value == null) {}

    value = getOADBTransaction () .getSequenceValue ("FWK_TBX_EMPLOYEES_S");

    }

    setAttributeInternal (EMPLOYEEID, value);

    }

    but whenever the button click apply, I got following messagenumber - in EmployeeAM.EmployeeCreateVO1 EmployeeId attribute is required.

    I have try to disable the validation server with the following code in the PR, but obtained following the message "EmployeeId attribute in EmployeeEO is necessary.

    OASubmitButtonBean applybutton = (OASubmitButtonBean) webBean.findChildRecursive ("Apply");

    applybutton.setServerUnvalidated (true);

    Thanks in advance,

    efends

    Hello

    Uncheck the required property for EmployeeId.

    When the user click to button apply. get the current line for the view and set the EmployeeId filed.

    You don't have to crush create method in the java file entity oject impl.

    You need to write a method in the file java application module.

    public void setEmployeeId {
      XxVo vo = getXxVO();
      Row currentRow = vo.getCurrentRow();
      currentRow.setAttribute("EmployeeId", getOADBTransaction().getSequenceValue("FWK_TBX_EMPLOYEES_S"));
    }
    

    Call this method from the application process when the user has clicked on apply.

    Kind regards

    Anil

  • A good difficulty for problems with creating an account ePrint Center.

    Problem: impossible to register with ePrint Center

    Difficulty: The problem you are having is probably due to an old Snapfish account registered to your email address. ePrintCenter and Snapfish account information is stored in the same place and I saw this before conflict.

    You will need to go to http://www.snapfish.com/snapfish/welcome, click on "Sign In" in the upper right corner of the page and then click on the 'forgotten password' link and enter the email address that is causing your problems, you should receive an email from Snapfish, which allows you to create a new password. Once you have created a new password for Snapfish, try to Sign In on ePrintCenter (http://www.eprintcenter.com) using your email address and the password you created for Snapfish.

    If you have any other questions do not forget and let us know. We're here to help.

    If I have SOLVED your problem, please do not hesitate to provide LAURELS and make sure that you mark this thread as a SOLUTION OFFERED!

    Although I work for HP, my messages and responses are my own opinion and not of HP.

    In addition, if the fix above does not seem to solve the problem or if you are unsure if you have a Snapfish (http://www.snapfish.com) account, use the e-mail address you want to use with ePrint Center (http://www.eprintcenter.com) and then use the information that you created and try to "Sign In" or create an account on ePrint Center.

  • Problem with creating an image map

    I struggled to create a simple image with Dreamweaver CC map.

    I'm in Design view and have a simple flowchart that I would have on my site with each network diagram box with a link to an additional page with more depth on the subject content.

    If I click on the image in live view, the properties toolbar does not show the part of image map (see first image).

    Capture1.PNG

    However, if I click on the code from the image map controls appear (see the second image).

    Capture2.PNG

    Now, behold, where the question is...

    If I click on the rectangular selection tool in the map properties bar and then try to select the portion of the image to have a point of access/link; the part of the map of the toolbar disappears and returns to the appearance of the first view?

    Therefore, I can't make a selection or create the HotSpot...?

    Please help with advice you may have.

    The site is responsive, and I decided to recreate this image as an SVG, so that it can scale - with a sensitive site, but I just want to experiment with the layout before generating the final graph.

    Thanks for any help you may have!

    Problem is that you are in LIVE view mode.  Switch to DESIGN view for working with image maps.

    What happened to the use of SVG for your tree?

    Nancy O.

  • Problem with creating organization assignment

    Hi all

    I wanted to give permission to create the Organization to a role in OIM 11 g. Its cities on the link: http://docs.oracle.com/cd/E17904_01/doc.1111/e14316/role_mangmnt.htm

    the DIRECTORS of ORGANIZATION IDENTITY of IOM default role is the role that is used to grant this permission to any user. But the problem is that I can't find this default role in the roles of IOM. I don't have IDENTITY USERS ADMINISTRATORS but not for organizations. Can someone ' a please guide me as to what exactly am I missing here?

    Thank you
    $id

    Try again with the role of OPERATOR

    To customize permissions, click on the link given in my post above

  • problems with creating a subpage template

    Hello

    I have a question and would appreciate your help please.

    I created a model with common elements of my pages, including global navigation header and footer, when I try to create a subpage of the template and save it in a different folder as index.php one image now appears in the new index.php file.what should I do to solve this problem, thank you.

    loopy22

    Well the lem prob here is that you have a path relative to the document on this image:

    images/emusicdownloadslogo.gif"
    
    change it to root-relative:
    
    /images/emusicdownloadslogo.gif"
    
    and you'll be good to go.
    
    However, you had said that this page was created as a Child of a DW Template, however this page has no such code.
    
    It was not created as a Child page of a DW Template.  So not sure why you think it is.  Perhaps you mean thatyou copied a page you are calling a "template" in one folder and pasted that code into a new page in another folder?
    
    -- 
    
    E. Michael Brandt
    
    www.divahtml.comwww.divahtml.com/products/scripts_dreamweaver_extensions.phpStandards-compliant scripts and Dreamweaver Extensions
    
    www.valleywebdesigns.com/vwd_Vdw.aspJustSo PictureWindowJustSo PhotoAlbum, et alia
    
    --
    

Maybe you are looking for

  • Is it possible to change the new ugly background when I wake my iMac to sleep in the Sierra?

    My iMac is password protected. When I wake from slumber in the Sierra again, he has a new ugly, indefinable experience. Is it possible that I can change this?

  • Apple Beta Program software - unsubscribe?

    Hello I tested iOS 10 Beta 2 and I am seriously considering downgrading to a version more secure IOS 9.3.3, but I don't want to lose the many changes I've done (IE, downloaded or deleted apps, apps moved to different folders, change system configurat

  • Failed to create the Genius playlist on iOS 9.2 on iPhone

    I found a lot of screen showing me that I should have this choice, but I have no shots.  Find the instruction to go to settings/music and toggle Genius on.  There is no choice.  Settings/music gives the Music Show Apple, use of cellular data, high-qu

  • PXI-8513 appearing does not in MAX

    I have a chassis NI SMU-1071, with embedded controller SMU-8100, DAQ, PXI-6229 and PXI 8513 CAN / XS. Today I tried to receive SOME messages by using the XNET Read.vi and Session.vi to create XNET but when I wanted to specify an interface, he couldn'

  • XpsDocument visual alignment written does not correctly

    I'm generating the file xp. If I change the value by default that is top-left alignment of elements, then they will not display correctly in the xp file. using (var doc = new XpsDocument(fileName, FileAccess.Write)) { var writer = XpsDocument.CreateX