order of varchar and digital data

Hello

I use the apex of oracle 10g 3.2

I am using an sql query in a region. I want to make sure he by setting col.parameter column is varchar2 (1000).
The values can be of a character or the format of number of characters.
as
format ABC or def - 1

Now, I want to use the order by clause in there.

But when I have data like
ABC-1, abc-2 11 - abc

His comes as
ABC-1
ABC-11
ABC-2

instead of abc - 1
ABC-2
ABC-11

the query is

Select distinct
p.Parameter Test
of T_RESULTS t, M_PARAMETERS p where p.parameter_id = t.parameter_id and
t.service_registration_id =: P43_SERVICE_REGISTRATION_ID
order to decode (instr(p.parameter,'-'), 0, p.parameter, to_number (substr (p.parameter, instr(p.parameter,'-') + 1)))

So, what should I do?

Thank you

Hello

with t as (select 'abc-1' col1 from dual union all
select 'abc-11' col1 from dual union all
select 'abc-2' col1 from dual)
select col1
from   t
order by case instr(col1,'-') when 0 then col1 else substr(col1,1,instr(col1,'-')-1) end,
             case instr(col1,'-') when 0 then 0 else to_number(substr(col1,instr(col1,'-')+1)) end

The first element will sort the alphanumeric characters, the other numbers if they exist.

Herald tiomela
htendam.WordPress.com

Tags: Database

Similar Questions

  • analog and digital data synchronization

    Hi all

    I would like to help with what I seek to accomplish, if you don't mind much.

    I'm trying to synchronize the acquisition of analog and digital modes using a common trigger that launches both types of data collection at the same time. What I've done so far, is wasting his time trying different combinations to gather examples of LabVIEW 2011 on the synchronization of data - namely the 'Multi-multifunction-Synch AI lu Dig Chan.vi' and 'Multi-Device Synch-Analog Input-Finite Acq-Analog Start.vi.

    I tried to combine the two, because one contains digital and analog, the other contains the trigger for multiple tasks.

    I guess I should place the trigger (either digital or analog-eventually I will want to choose) then call the "Get Terminal name with device Prefix.vi. But from there I'm not sure wheter to connect the name of the terminal of the sample clock digital channel or a digital leading edge of the digital chain trigger.

    Also, the way it is wired now I get errors at the local terminal name, so I don't know exactly where this terminal must come from.

    I try my best, I could use a little help, I have attached my attempt with the examples that I speak to you.

    Thank you.

    Hi beefcake.

    The CtrInternalOutput internal output line is used as sample for your digital output sample clock source clock. If you change the settings for your CO Pulse Time is Dev1 and your digital output is Dev2, you will notice that the name of the product terminal would give Dev2/CtrInternalOutput. So what you get here, it's as well as the digital output device sees his sample clock, instead of the clock itself.

    If you just want to use a digital/analog input as your trigger, you should do something more as in the example above. Do you use multiple devices, or are all your lines on the same device? This example is more complicated because it is synchronization of signals on several devices.

    Looking at how this VI is wired, you can see that the digital signal triggers the analog signal. You want the analogue signal must be started first, so that when the digital signal triggers the analog task is already running and can trigger immediately. If the digital task started first, it can trigger until the similar task had started, and they do not exactly trigger at the same time.

    I hope that clarifies things. Kind regards

  • How can I justify the difference between varchar and varchar2 data type

    Hi all

    How can I justify the difference between the data type varchar and varchar2 on any table for space management.
    Is there any query to justify this.


    Concerning
    Girish

    Published by: boujemaa on February 2, 2011 21:23

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14220/datatype.htm#sthref3780


    The VARCHAR data type

    The VARCHAR data type is synonymous with the VARCHAR2 data type. To avoid any changes in behavior, always use the VARCHAR2 data type to store strings of variable length.

  • UNION ALL in VARCHAR and CLOB data types

    Hi all

    I want to execute the below query, but the Oracle is throwing a single error.

    Select the comments as cm_comments from table1

    Union of all the

    Select text_action from table2

    Union of all the

    Select the notes to table 3

    Union of all the

    Select null from table 4

    Error I got: ORA-01790: expression must have the same type of data, matching expression

    Here, all columns have the data type of the CLOB except the 'notes' column in the table "table3." I know that this is the reason for the error, but I need a work around that. One solution I know is that cast varchar of clob type, but in this case, there is a chance to cut the data if the CLOB column contains data whose length is greater than the maximum data length for a VARCHAR column.

    Please help me in this case to find a solution to this problem.

    Your timely help is well appreciated.

    Thanks in advance.

    Try the below with TO_CLOB

    Select the comments as cm_comments from table1

    Union of all the

    Select text_action from table2

    Union of all the

    Select TO_CLOB (notes) in table3

    Union of all the

    Select null from table 4

  • Save the text data and digital

    Hello

    It is two part question/need help: -.

    1. I want to display the same number of decimal places on the table as in the attached picture.  In addition, include text on the last column of entry (as shown in the picture).

    2. I also want to save the data in a file where there are also many digital data and textual data as shown in the picture as an attachment.

    Any help will be greatly appreciated.

    Thank you

    hiNi.

    You must format the values separately and mount it as an array of strings. I don't understand the purpose of the shift register. Why are there controls and a case user operated inside the loop structure, because the loop will run so fast that any user control would be unpredictable.

    Here's a simple code (LabVIEW 8.5) that you could use. Modify if needed.

  • I have the order number and the date of the order with me want to support adobe creative cloud can advise you how to go to this topic

    I have the order number and the date of the order with me want to down load remains creative cloud on my desk pls can you advise me how to on this subject pls

    Cloud creation help / Creative Cloud to desktop

    https://helpx.Adobe.com/creative-cloud/help/creative-cloud-desktop.html

    Cloud creation help / sign out, sign in | Creative office cloud app

    http://helpx.Adobe.com/creative-cloud/KB/sign-in-out-creative-cloud-desktop-app.html

    Cloud creation help / install, update or uninstall applications

    http://helpx.Adobe.com/creative-cloud/help/install-apps.html

    Install creative Cloud applications

    http://TV.Adobe.com/watch/CS6-creative-cloud-feature-tour-for-video/installing-desktop-app s-of-creative-cloud.

  • Using CC of Muse, I want to generate a survey in order to process digital data.

    Hi all

    Very new to web design and Muse.  I'm currently looking through tutorials for basic usage.

    My question is, can I generate a survey that will collect digital data based on questions such as:

    "How many times a week do you...." »

    I so want the data to be processed based on the parameters and weightings etc. which I stated, and gives the user a rating based on their responses.

    This kind of thing is possible in the Muse? Or do I need a design software web based code?

    See you soon

    James.

    Hi James

    Yes it is possible if you host your site with Business Catalyst.

    Web Forms can be used to collect data with custom fields, and then you can filter using the generation of reports.

    Data collection and rating submitted data are 2 separate process, for example, I have a field in my booking form "how many seats" and boxes option to select numbers. This process will allow to save user data submitted. On another page, I have a blog/forum where user submits its history and then people can comment on, and note the element, which is a separate process.

    Both can be carried out on the end of BC.

    and in case you want to all the functions to be put on the same form, you must use Web applications, with which it is possible.

    For example, I create a web application and an application form for comments and same time I configure to display presentations on my web page where viewers can rate/comment on submissions.

    Please go through these documents for more details:

    http://helpx.Adobe.com/business-catalyst/using/create-insert-form.html

    http://helpx.Adobe.com/business-catalyst/partner/add-Forum.html

    http://helpx.Adobe.com/business-catalyst/using/add-blog.html

    http://helpx.Adobe.com/business-catalyst/partner/Web-apps-module-create-custom.html

    Thank you

    Sanjit

  • Number and types of digital data

    Hello



    My table contains data, it is a very large table, data type of the columns little is just number (no precession or scale not reported). When this table get imported OWB and used in maps, then the display of the size of the column number in the Numeric form with zero as the precision and scale. The source in the mapping table contains the same type of data columns but with precision and scale declared. When I validate the mapping I get ' precision of the column is greater then the column target ' error. "



    I tried to edit the table with the same precision and scale as a source but as data are already existing, throws to oracle cannot reduce the size. I don't want to create another table and generate data and reload as this is a large table.



    Is there a solution for this problem, please help.



    Thank you

    HESH

    Ignore this warning.

  • How can I search for files in a range of digital data

    Is there a way to specify a range of digital data in Windows 7 search for example File1 through deposer10 included

    Thank you

    So you're saying that file names could be, for example, hotdog4.txt for hotdog15.txt?  Well, you can look for in an orderly series, numerically and alphabetically, with two periods between the first and the last item, as in name:hotdog4.txt... hotdog15.txt

    Interestingly, Windows by default notice when the names correspond to a digital frame and so will sort hotdog4 to hotdog10 and so on, despite 4 being a number greater than 1 Prime figure 10.  I found a reference to this topic (but do not disable anything probably, just for the pleasure of reading):

    http://www.askvg.com/how-to-disable-numerical-file-name-sorting-and-enable-classic-literal-sorting-in-Windows-XP-Vista-and-7-Explorer/

  • Capture and send data in a DPS application

    Hello

    I was instructed to turn some catalogs catalog/order apps. We printed catalogs (designed in InDesign) representatives show stores and they order huge amounts and they want me to integrate the catalogue and orders in one digital solution.

    Thus, for example, a rep goes to the store and begins to go through the catalog on his iPad. The seller sees a product that he loves and he wants 100 of them. The rep then, on this same page, selects a quantity of 100 and click on "add to order". They then continue through the catalog of product order as they go. Once the rep, click 'place order' button and all orders are sent to Headquarters for processing.

    What InDesign and DPS able to do this? It can record data? What happens if I use the 'Web Content Overlay creator' for the part of data capture? I mean, I'm going to build an appropriate for this application?

    If anyone has seen an app that does please let me know that I can't do that.

    Thank you for your time,

    D

    Hello

    Looks like you want to use forms for this scenario.

    At the time current DPS does not accept the forms. You will have to use an overlay of Web or import HTML.

    There are other threads dealing with this:

    http://forums.Adobe.com/message/5097947

    http://forums.Adobe.com/message/4857775

    http://forums.Adobe.com/message/4598027

    http://forums.Adobe.com/message/4009163

  • Order of iTunes LPs & digital booklets in multi-disc albums

    Does anyone know when the order of these past? I remember well first iTunes LPs to access booklets and digital last. Both are now going after disc 1. Research disorder during playback of songs sorted as Album of the artist.

    TT2

    I remember good iTunes LPs used to go books first and last digital

    That's what I remember too.

  • Date of creation and the Date of importation

    When you import photos or video in the Photos to a folder, the application uses the date of importation of integration rather than the original creation date.  The result is that imports are all presented together under "Today."  Many photos and video taken on different dates, so I would only they listed according to date of creation rather than be grouped under the date of importation.  I went 'View' and checked "date of creation".  Photos don't work with "SORT" because it is always grey.  Any help would be greatly appreciated!

    If you look in the window of Photos photos and videos are sorted by date with the oldest items at the top.  This sort order cannot be change.

    In the pictures window, the elements are sorted by the date imported into the library with the oldest at the top.  The sort order cannot be changed here either.

    So, you can use a smart album to include all your photos in the library and then sort them one of these ways:

    The smart album could be created to this criterion:

    that would include all the photos in the library.  Now you can sort them as you like.  Just make sure that the date is early enough to catch all the photos in the library.

    Moments in Photos are new events, i.e. groups of photos sorted by date of catch.

    When the iPhoto library has been migrated first to the pictures there is a folder created in the box titled iPhoto events and all migrated iPhoto events (which are now Moments) are represented by an album in this folder. Use the Command + Option + S key combination to open the sidebar if it is not already open.

    NOTE: it has been reported by several users that if the albums of the event are moved in the iPhoto Library folder in the sidebar, they disappear.  It is not widespread, but several users have reported this problem.  Therefore, if you want to if ensure that you keep these event albums do not transfer out of the iPhoto events folder.

    Is there a way to simulate events in pictures.

    When new photos are imported in the library of Photos, go to the smart album last import , select all the photos and use the file menu option ➙ New Album or use the key combination command + N.  Call it what you want.  It appears just above the folder to iPhoto events where you can drag it into the events in iPhoto folder

    When you click on the folder to iPhoto events, you will get a window simulated of iPhoto events.

    Albums and smart albums can be sorted by title, by Date, with the oldest first and by Date with the most recent first.

    Tell Apple what missing features you want restored or new features added in Photos Photo-Applefeedback.

  • DAQ USB 6363 - generate digital data series through the single DIO line

    Hello

    I'm new with Labview, currently, I bought NI DAQ USB 6363 for generating control signals and signals analog accquire. I would like to send digital data series through one of the digital IOs with throughput of 30 kbps. Please see the attachment for the data frame. Could someone comment the feasibility of this? Y at - it codes for the example that I can refer to? Most of the examples I've looked at so far deals to generate several line instead of 1 single line. How can I achieve this?

    Thank you

    Diem

    Hey diem.

    After looking on your code, I understand what you were trying to do. Here's how I'd do. Usually we do not write code to clients, but you peaked my curiosity of! I hope this helps. Good luck!

    ~ kgarrett

  • measure the angular speed, angle and trigger using a gyroscopic sensor breakout board and LabView data acquisition

    How to measure the angular velocity, the angle and trigger using a gyroscopic sensor breakout board and LabView data acquisition?

    There is a single channel data acquisition code which measures the angular velocity, angle and flexibility using a gyroscopic sensor breakout board and acquisition of LabView data attached to this, I need a help to creat two-channel data acquisition code?

    Hello

    Attached is a vi that you can use in order to read the measured angular position of an encoder.

    If you need more examples on the tasks that you can develop with NOR-DAQmx and LabVIEW, you just need to open LabVIEW and click Help > find examples > Input and Output material > DAQmx > entry counter.

    Kind regards

  • FFT of digital data

    Hello everyone.

    I'm having some trouble for my project.

    I would like to apply the Fast Fourier Transform on data acquired by an accelerometer. I do measures of vibration, data entry is a string it is then cut into the values of the axis 3 and converted into numbers.

    What I would like to make is the FFT of these data, but I don't know how to "transform" waveform to apply the transformation.

    Any help is appreciated.

    My VI, commented, is attached.

    Dear AndreasSchnaas,

    Try the "worksheet to an array of strings.

    To enable a detailed response, record the value by default in your orders and indicators data and post your VI once more. Data can be collected using your VI, unless the equipment is available for the user.

    See you soon,.

Maybe you are looking for

  • List incoming emails to be more large email not only himself

    HI: I just reconfigured my email on Thunderbird on my new mac (used very well on my old computer). I can barely see the list of messages in my Inbox. I realized how advanced parameter increase the size of the font of each e-mail when it appears in th

  • Stream 7 BIOS password HP does not / Bypass Pass administrator BIOS?

    My problem is that cannot get the BIOS of HP 7 flow. After pressing 'Power + flight upwards' it leaves me the "Start menu".When I press F10 to enter BIOS he asks me to "Enter the administrator password"After a few attempts, I finally got the message:

  • IdeaPad G510 Fn F1 - F12 swap?

    Hello, there is no section for the G series (I don't understand why) so I would ask here:How can I share the feature of the F1 - F12 buttons with the Fn functions? I don't want to press Fn + [volume mute] every time I want to hit F1 etc. I read somew

  • HDMI handshake

    Have a brand new HD5670 ATI 1 GB video card that works very well with VGA/DVI connection. But what use the HDMI output on a screen LCD HD from Toshiba computer port must be restarted if the connection is changed in any way - turn off the monitor and

  • Product number Activaion

    Recently, I had my Windows reinstalled Vista and am now requirred to enter the product number to activate it. When I try to enter the number and put a 0 in the issue refuses to Windows to accept to say that it is an unacceptable number. I got the num