A loop using the SQL select query.

Hello

I wanted to know, if the concept of loop is possible thanks to the SQL select statement.

For example
=======

Table T1

Col1 Col2
Slim 10

I want to write a query in such a way, so that when I get the result of the query, I format below.

Col1 Col2
Slim 10
Slim 10
Slim 10

Basically what I'm trying to achieve is, I have a table with two columns and it has a single line displayed above.

I want to display this line several times as the output of my SELECT query.

Let me know, if this target is achievable.

Kind regards
Saurabh

Like this?

SQL> SELECT 10 col1, 'Sourabh' col2
  2    FROM DUAL
  3  CONNECT BY LEVEL <= 3;

      COL1 COL2
---------- -------
        10 Sourabh
        10 Sourabh
        10 Sourabh

SQL> 

Tags: Database

Similar Questions

  • How to select only the part by using the sql query

    Hello

    I have the task to retrieve only the integral of the input text by using the sql query.

    The entry is as follows

    Entry for the price setting

    $12.5 (FYI without space)

    $ 12.5 (FYI single space)

    $ 12.5 (double space FYI)

    $12.5 (FYI multiple space)

    $12.5 (FYI multiple space)

    Output expected of 12.5

    The price is the type varchar2 column in the store_price table.

    Please let me know how to achieve this.

    Thanks in advance.

    If this is always the case that you get a $ followed by a number of places, you can use something like:

    Select to_number (ltrim ('$ 12.5',' $')) DOUBLE

    or

    SELECT ltrim ('$ 12.5',' $') OF double

    but take care of your nls_numeric_character settings if they are defined so that, for example, a comma is the decimal separator, you will have a problem.

    HTH

  • Loop through the sequences selected using set of entry points into LabVIEW OI

    Hi all

    I have an operator Interface where the operator has the option to select specific measures and loop over the sequence selected according to the needs.

    Everything works as expected, but the customer wants to remove the default loop configuration pop-up box.

    Must be defined by programming the parameters of the loop (and not by the user). I figured out how to build arguments interactive but don't know how to spend it.

    Any ideas / suggestions would be greatly appreciated.

    Thanks in advance.

    Kind regards

    SS

    UnspecifiedError wrote:

    I am aware of this method and it works well, but the requirement is to run with the model process for example 'Test DUT' entry point

    Use SequenceViewMgr.ExecutionEntryPoints to get the corresponding entry point object, and then use EntryPoint.LoopOnSelectedSteps ().

    Hope this helps,

    -Doug

  • What is the sql SELECT statement to list all service names in the database?

    What is the sql SELECT statement to list all service names in the database?

    I tried
    SELECT name FROM dba_services
    But a long with valid service, he list also some other documents that are not the names of services.

    Hello

    You can try this query:

    select name, value from v$parameter where name = 'service_names';
    

    Hope this helps.
    Best regards
    Jean Valentine

  • Stupid question CS6. How can I get rid of my experience after using the quick selection tool?

    Stupid question CS6. How can I get rid of my experience after using the quick selection tool?

    The best way would be to make sure that your layer is not a background layer: click the lock icon in this case. Then click the icon at the bottom of the layer panel layer mask. This will create a mask that you can refine and not be destructive.

  • Hello! My question is, why so many photoshop is making selection when using the quick selection tool, before that it was unable to myself. Can someone tell me aolucion, please. Thank you!!

    Hello! My question is, why so many photoshop is making selection when using the quick selection tool, before that it was unable to myself. Can someone tell me aolucion, please. Thank you!!

    Hi Axe_Juan,

    Could you please let me know the version of Photoshop installed on your computer?

    Also you want to State as Photoshop not to do a quick selection?

    If so, then head over to the Photoshop preferences, then the performance tab and click on 'Big and flat', restart Photoshop and then use the selection tool.

    If something else, please let me know.

    Kind regards

    Tanuj

  • When I use the quick selection tool, selected part becomes black and fuzzy.

    Hi all

    When I use the quick selection tool, the selected part becomes black and fuzzy. It is unusable as an image (see below). Do you know what setting is related to or how to fix it? Thanks in advance!

    Photshop forum image.PNG

    Hi breeves,

    Please go into Photoshop preferences > performance > advanced settings > change the drawing to Basic mode > restart Photoshop and then check

    Additionally, make sure that your graphics card drivers are updated.

    If this does not help, give additional details, including the version of Photoshop, you use? What operating system?

  • Using the Quick Selection tool

    I'm new to CS6... after the tutorial in welcome after that start the Narrator merges the two images... He selects a giraffe with a single click using the Quick Selection tool and adds it to another layer (Beach) is it possible even in CS6?  I tried to reproduce what has been shown in the tutorial... and can not... can you help or explain?

    Without having seen the tutorial, you have to guess what was going on.  You would not be able to choose the giraffe with a simple click on the Quick Selection tool, but you may be able to select the background if it is a single solid color, such as white.  Having done this, you can either remove the background, or invert the selection (Ctrl Shift I) leaving only the selected giraffe.

    Recommended from here would be to copy the giraffe selected on its own layer (Ctrl-j).  You could then drag the giraffe to the other image.

  • Why can I not select an object using the direct Selection tool?

    PHOTOSHOP: I have an ellipse I have rasterized. Why can I not use the direct selection on it?

    The direct Selection tool is designed for use of vector path.

    If you want to use the tool, you can get your selection by going to the Panel traced and clicking the work path make the symbol at the bottom of the Panel, a path

    Then, if you choose, you can click the load path as a selection symbol to return to the moving dotted line (rasterized).

  • I would like to cut out an object using the Quick Selection tool and drop the object into another image. Can anyone help

    I use background images and want to cut objects of other JPEG files using the Quick Selection tool and drop them in the background image. So if I have a banana and select the object, I need to copy the banana in the context on the other.

    Hope it makes sense.

    Gary

    Select the banana. Right click > copy layer. Move tool. Click and drag to the other file. Place on the image.

    GOLD: load history and banana in a stack (file > Scripts > load file in the stack). Select banana and layer for copy or create the layer mask.

    Benjamin

  • Can I turn off the setting that displays the height and width in a small black box when you use the marquee selection tool?

    In Photoshop CC on a mac...

    When you use the marquee selection tool, a little black box appears next to the cursor and displays in real time, the height and the width of the selection.  The same annoying box also appears when you drag an item with the tool move, displaying the numeric position of the cursor.  Is there anyway to disable the display of this little black box?  It makes me crazy.

    In cmd/ctrl-k preferences click "Interface". At the bottom of the interface user is a drop down menu to see the transformation. The value as 'never '.

  • A question, when you use the sql Profiler features!

    Hi all.

    I have a question, when using feautre profile sql to oracle 10 g 2.

    As you know, 'DBMS_SQLTUNE. Procedure EXECUTE_TUNING_TASK' gives us
    a sql plan imploved automatically.

    However, in the event that the sql recommended plan of 'DBMS_SQLTUNE. EXECUTE_TUNING_TASK ".
    is not good enough to accept the plan sql generated, and instead, I have a better plan of sql.
    What should I do?

    Is it possible to force oracle to use my plan sql instead of plan recommended by oracle sql?
    The stored outline is not an option.

    Thanks in advance.
    Best regards.

    It seems that you really want to use the sql Profiler then?

    You can grant not only the instruction for this plan you want?

    If you want to manually create a profile, and then see the post below Kerry Osborne, essentially, you can remove the indicators needed to education to listen to v$ sql_plan and then their card in a profile for the original statement:
    http://kerryosborne.Oracle-guy.com/2010/07/SQLT-coe_xfr_sql_profilesql/

    See also the paper of Christian Antognini on profiles:
    http://Antognini.ch/papers/SQLProfiles_20060622.PDF

    11 g, base lines offer a much better facility to trace a plan from a single statement in a reference to another database.

  • White lines using the quick selection tool in conjunction with the Content Aware Fill.

    When you use the Quick Selection tool in conjunction with content aware fill I get a white line where is the join of the image.

    How can I stop this from happening?

    Basically, I need the tool select 'more select' in the next photo is a shame without welding.

    This isn't a complex selection, it's a photomerge with blank areas, white I'm filled out with content outside filling.

    Thanks for your help.

  • creation of database using the SQL command * more

    Hello

    This isn't a matter of urgency.

    I learn the Oracle DBA. I have installed Oracle 9.2 in my windows system. And I'm trying to create a database using the SQL command.

    OracleVersion: 9.2
    Windows XP operating system

    CREATE DATABASE suri
    USER SYS identified by manager
    USER system identified by surendra
    LOGFILE GROUP 1 ('F:\Oracle\oradata\suri\redo01.log') SIZE 100M,
            GROUP 2 ('F:\Oracle\oradata\suri\redo02.log') SIZE 100M,
            GROUP 3 ('F:\Oracle\oradata\suri\redo03.log') SIZE 100M
       MAXLOGFILES 5
       MAXLOGMEMBERS 5
       MAXLOGHISTORY 1
       MAXDATAFILES 100
       MAXINSTANCES 1
       CHARACTER SET US7ASCII
       NATIONAL CHARACTER SET AL16UTF16
    DATAFILE 'F:\Oracle\oradata\suri\system01.dbf' size 200M EXTENT MANAGEMENT LOCAL
    UNDO tablespace undots datafile 'F:\Oracle\oradata\suri\undots01.dbf' size 200M
    DEFAULT TEMPORARY TABLESPACE tempts1 DATAFILE 'F:\Oracle\oradata\suri\temp01.dbf' SIZE 100M EXTENT MANAGEMENT LOCAL
    I get the error like below when executing the CREATE DATABASE command.

    ERROR at line 16:
    ORA-25139: invalid option for CREATE TEMPORARY TABLESPACE
    I have validated the syntax but not able to find where is the error.

    Please let me know if you need more details.

    Thanks in advance for your help.


    Kind regards
    Suri

    OracleVersion: 9.2

    Why a so old version (and desupported)? In any case...

    TEMPORARY TABLESPACE tempts1 DATAFILE 'F:\Oracle\oradata\suri\temp01.dbf' SIZE 100 M EXTENT MANAGEMENT LOCAL default

    .. try change DATAFILE with TEMPFILE.

  • PS CS 5.1 crashing when I use the quick selection was in the format of neg

    I use PSCS5.1 and when I use the 'Quick Selection' tool and use the 'Alt' key to turn to the negitive so that I can cut things I don't want to choose, I get a message saying "Adobe CSP has stopped working" and it closes the program! I use a PC with Vista.

    Help... PLEASE...

    Hugs, Theresa

    Unfortunately, the failed module is ntdll.dll, which does not say much.

    Some basic troubleshooting: go in the Edition - Preferences - Photoshop performance dialog box and uncheck] enable OpenGL drawing, then restart Photoshop.  The problem persists?  If this isn't the case, you might have a problem of display driver.

    -Christmas

Maybe you are looking for

  • Up graded to the latest version and then it crashes. Your corrections are a merrygoround!

    Use Mozilla firefox since 15 + - years, seems lately there seems to be more and more problems.

  • Thunderbird supports more than one e-mail account? How?

    I'm looking for an e-mail program that supports more than one e-mail account easily. Is Thunderbird such a program? How can I have three accounts for different purposes? Edit: deleted for your protection - personal information it is not a good idea t

  • MediaFire does not download link

    It's been a week that I finally managed to download from Mediafire. When I click on a link Mediafire, download link shows well that the page has finished loading. Refresh the page several times doesn't help and I tried the solution to remove all cook

  • Can't access "Change Date" property of the DataSet

    Hello: Ive had similar messages, but nothing seems to match what I would make in 2012 tiara. I want to get a time stamp from a set of data to show exactly when the test was run.  The data I work with have a datetime string, but it is set by default t

  • Microsoft VM is installed on my computer?

    I have a program that requires Java installed to run.  My computer shows that I have Java installed.  Help box says that I must have msjavx86.exe contained in jvmlnstall.zip.fil.  I'm stuck.  I'm not savvy computer then!