Bessel functions complex in LV 2009?

Can someone please explain if in LV 2009 Bessel functions operate on complex entries and provide complex products? The text of "Help" mentions the outputs true only.

A quick test on the function of Bessel Jv of zero-order seems to indicate that it takes a complex input, but offers a real output. He simply ignores the imaginary part of the entry?

Any input much appreciated, thanks!

Peter

Hi ttrr

Thanks a lot for your quick and helpful explanation. I thought that something like was happening, your confirmation very appreciated.

The only viable solution that I found is using Matlab (BESSELJ Excel can not handle complex inputs either).

Concerning

Peter

Tags: NI Software

Similar Questions

  • I can not find how to run this program on my HP50g Bessel functions...

    Hello!

    Recently, I buy my HP50g calculator and tried to find and install programs that I need... Solvesys is running, but I can't find how to operate this Bessel function program. I installed it exactly as solvesys (load the lib archive on the calculator and chargue on flash), but I can't find how to run commands, or when they are to crush with. I tried to access the list of orders directly through flash (press the arrow to the right while on archive of lib, then select from the list an eval push) but I get only a result bad argument...

    Can someone guive me a helping hand?

    The link for the program is

    http://www.HPCalc.org/details.php?id=3140

    Thanks in advance for your help

    Hi!, Ahkran:

    Happy new year and welcome to the Forum!

    (1) you need to download the library library 764, BESSEL V1.2, HP50G, in the HOME directory.

    Now, you need to install and stay permanently in memory, in any port (0, 1 or 2). Best if the option port 2 (Flash)...

    Now, reset the HP50G, with YOU and key F3 (C)...

    Find the library in Port 2, with orange right shift key and key LIB (2), with name BESSE. If necessary, use the NXT (L) key...

    Now press the function key (F1... F6), just below the word BESSE, in your HP50G.

    You have to see...

    and with NXT - key...

    Carefully read the instructions for use library 764, the .pdf file, the author.

  • Looking for a screw with specific properties

    I maintain a LabVIEW project (1000 + screws), and some portions are reentrant.  I want to reduce memory footprint.  One method, that I intend to use to do this is editing VI properties for some screws I need to be able to search through all these screws to identify those who have the following set of properties VI execution:

    (1) 'Allow debugging' checked

    (2) 're-entrant execution' checked

    (3) "clone to Preallocate for each instance' selected

    Once I find these screws, then in the IA function complexity, its use, and if or not he converses with material resources or ask for input from the user, determine whether or not it is course change the properties of the VI to: disable debugging, or select 'Share the clones between instances' instead of 'Clone of Preallocate for each instance.

    The problem I have is this: How can I create a search looking for VI with specific property VI settings?

    Thank you

    Richard Ballantyne

    Here is a LabVIEW 2009 code that search in a folder or file LLB to find all the screws that match certain properties of execution of VI.

  • "Stop IMAQ" takes 10 sec to run and consumes 100% of CPU

    Hi, I'm calling IMAQ stop to put an end to an acquisition, but it consumes 100% of my CPU and takes 10 sec to complete (all your 100% CPU).  In our application, we have start and stop the device regularly, and that's exactly when the user wants the program is interactive, if this delay of 10 seconds is great irritation to them.

    My setup is - camera scan online Dalsa Piranha, RT 9 running on a desktop PC (it is compatible according to the test), PCI-1429 cameralink map.

    Any help or comments welcome.

    Thank you.

    Ah, I managed to solve it, but first, here are the answers to your questions:

    With the help of Stop and then close or simply close makes no difference.  The judgment takes so long that I just used a probe before and after on the cluster of error and with function of probe of 2009 timestamp I could easily see how long it took.  For a more detailed analysis of the time I use the United States available with RT timer

    Anyway, the way I solved the problem was ensuring that I stop acquisition BEFORE the clock of the camera line is stopped.  So stop IMAQ probably wait for the end of the current frame before returning - and if the clock of the line stops at Midway through a framework (as was the case), a timeout of 10 seconds causes probably Stop back later.

    The clock of the line is powered by an acquisition of data (via RTSI) card and I simply closed the session to this counter after calling IMAQ stop.  Data acquisition interface is not displayed in the example above, as it is coded in an another vi.

    Thanks for all the help.

  • labVIEW: resource not found. When you run executable

    Hello

    I had a fully functional vi with LabVIEW 2009 (continued from developer) and must be able to run it on another PC without him.  I downloaded LV Run-Time 2009, but when I try to run the executable I built, I get an error that reads:

    LabVIEW: Reasorce not found.

    An error occurred loading VI ' NI_AALPro.lvlibderivative x (t) .vi '.

    LabVIEW support 3 error code: could not load before panal.

    I can run the executable on another PC with LabVIEW without problem.  I read somewhere on the need to stop the front panal beng removed on void screws with Application Builder, although I don't think I have.  I apologize in case this is a stupid question, and I appreciate any help.

    See you soon

    Luke

    In the Project Explorer, click with the right button on the construction specifications and select new > Installer.

  • Time clock real function communication RS-232 with Labwindows CVI 2009

    Salvation OR,.

    1st quarter > we at KPIT try to build a timer based LabWindows project as a system 'real time' that transmits a packet of 80 RS-232 bytes to an ecu each 10msec. With our current PC RS-232 communication port configuration (115200bps, 1Stop, no parity, 8 Data Bits, no flow control) we are facing difficulties when trying to send this package with consistency. The timer to 10msec mechanism does not always follow a call to 10msec timer callback function. Is it possible, as part of the 2009 ICB, we can get close to 10msec periodicity (more less more than 1msec)? (some times the periodicity is scary and my clock works at 100msec instead of 10msec however it is observed intermittently, not continuously). My machine configuration is CPU 2 GHz, 1 GB Ram, Windows XP. Please adivse.

    Q2 > in the future, we would like to update 4 stripcharts (with the answer of the ecu which is a 12-byte packet), a table that lists the 12 a bytes in each column and also write the package received in a file on the disk in the rest of the time between pitches to 10msec. Is this possible at all?

    Kind regards

    -Mowgli

    Salvation OR,.

    We at KPIT are grateful for the quick and accurate response. We have revised our project based on your inputs. We are pleased to announce that the timer is very well behaved for steps up to 10msec (more less jitter msec). We will now try to introduce a frequency appropriate for our GUI elements. Our project for your reference and final excel is attached. We hope that this data will help other users should they encounter a similar problem.

    Kind regards

    -Ashish

  • Cause of Smartphones Blackberry Desktop 6.0 blackBerry Roxio Creator 2009 to become non-functional

    Dear RIM,

    It seems that for your BB Desktop software to be as functional as we would both, you have integrated some components that cause my Roxio Creator 2009 Suite to become completely non-functional.

    If I uninstall your software and repair the following Roxio, it works well again.

    Reinstall your software breaks the suite Roxio once again, and a repair/reinstall of the suite so that your software is installed cannot be place that Roxio is most recognized as being installed properly or he sees components that prevent the installation happen.

    I tried to uninstall BB Desktop 6, fix Roxio and then return to BB Desktop 5, but after the installation of BB Desktop 6 my ability to synchronize my device (contacts, calendar, Notepad, etc) fails systematically.

    I wouldn't mind, except for the fact that my paid software is ineffective by your free software and the only potential ways that they coexist are for me to purchase and upgrade my Roxio suite.

    I do not expect you to solve my situation, I don't think you can really, but rather I am you advise potential problems that you may want to inform other people who download the software which can have situations similar to mine.

    Thanks for a great, if sometimes frustrating, range of products.

    Trevor Chapman

    Brampton, ON

    p.s. It's rather remote of you to not allow a method for me to send to you directly, but rather use this forum for 'voice' my concerns. Can't really call this committed customer service.

    Hi Ratenef,

    Sorry to hear that you have some difficulties with the BlackBerry Desktop Software. I would recommend the rest of this article and do a clean uninstall of BlackBerry Desktop software and then reinstall the version you prefer. http://bbry.lv/aZw0Yn

    Thank you

  • function works in a simple application but not more complex app?

    I made a simple with app

    2 symbols of movieclip containing photos of a butterfly with this actionscript

    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;

    butterfly_mc.addEventListener (MouseEvent.CLICK, bookcase);
    butterflyHand_mc.addEventListener (MouseEvent.CLICK, bookcase);

    function bigPic(e:MouseEvent):void
    {
    new Tween (e.currentTarget, "scaleX", Strong.easeOut, e.currentTarget.scaleX, (e.currentTarget.scaleX * 1.4), 4, false ' ");
    new Tween (e.currentTarget, "scaleY", Strong.easeOut, e.currentTarget.scaleY, (e.currentTarget.scaleY * 1.4), 4, false ' ");
    }

    When you click on the butterfly movieclips they grow up like I wanted.

    However when I apply the same actionscript code in a more complex application code does not work. Here's the relevant actionscript for a more complex application

    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;

    case1_mc.c1_mc.case1a_mc.addEventListener (MouseEvent.CLICK, bookcase);
    case1_mc.c1_mc.case1b_mc.addEventListener (MouseEvent.CLICK, bookcase);

    function bigPic(e:MouseEvent):void
    {
    new Tween (e.currentTarget, "scaleX", Strong.easeOut, e.currentTarget.scaleX, (e.currentTarget.scaleX * 1.3), 4, false ' ");
    new Tween (e.currentTarget, "scaleY", Strong.easeOut, e.currentTarget.scaleY, (e.currentTarget.scaleY * 1.3), 4, false ' ");
    }

    I don't get any error messages, but when I click on case1_mc.c1_mc.case1a_mc or case1_mc.c1_mc.case1b_mc, nothing happens. It is clear to you, what I'm doing wrong here?

    Any help is appreciated!

    If you don't know that you can see this movieclip (with the mouse listener), you must have an another interactiveobject covering what is intercept mouse events.

  • COMPLEX IN. - NO FUNCTIONALITY TO REDUCE THE VALUE OF RETAINAGE, OUTFIT

    Hello

    Purchase R12 provides functionality of holdback. Holdback number corresponds to the amount of payment to ensure that the contractor finishes the job as agreed. The buying organization releases these funds only after having verified that the contractor has fulfilled all contractual obligations. Retainage is also called 'retention' or ' holds contractual.

    The only way to reduce the amount of the holdback retained is to create a release of holdback Bill which then pays the provider.

    No feature is provided to reduce the value of the holdback downwards to account for the use of companies purchase funds to penalize the contractor if they failed to meet contractual obligations all.

    This is an incomplete solution. the holdback is intended to finance the purchase company to reward failure of the selling company. But how do we record use of these funds?

    If there is no mechanism to reduce the value of the holdback that is held so the value is always available to pay the contractor

    Thank you
    Umesh

    Published by: Umesh Chandra Moharana, June 25, 2009 16:05

    Published by: Umesh Chandra Moharana, July 2, 2009 09:40

    Umesh

    If you want to pay partially (on the amount withheld), create AP invoice manually (which is the way to get rid of the amount deducted) for this amount and pass entered GL GL for others.

    If you decide not to pay at all, you can manually pass entered GL or manually enter them Bill AP and cancel the Bill and pass entries manually to get rid of the value of the selected account.

    Also something can be done in ALS to create these entires automatically (with custom AAD)

    Thank you
    Claire

  • Call the DLL function with a pointer to a complex structure

    Hello

    I try to call a function by using COLD LAKE. My problem is the function parameters that I'm trying to access.

    Here is the function and its parameters:

    typedef struct _BAR_INFO
    {
    ULONG dwSize;
    ULONG dwFlag.
    } BAR_INFO, PBAR_INFO;

    typedef struct _DEVICE_INFO
    {
    ULONG dwBarNum;
    BAR_INFO BarInfo [6];
    } DEVICE_INFO, * PDEVICE_INFO;

    Int GetDeviceInfo DLLIMPORT)
    unsigned int CIH.
    PDEVICE_INFO pdevinfo
    )
    {
    ULONG i;

    If (DFR > = DevNum)
    Return PCICORE_DEVICE_NO_FOUND;

    If (DevTable [JC]. DevHandle is NOTHING)
    Return PCICORE_DEVICE_NO_INITIALIZE;

    if(pdevinfo == null)
    Return PCICORE_INVALID_PARAMETER;

    pdevinfo-> dwBarNum = DevTable [JC]. DevInfo.dwBarNum;
    < pdevinfo-="">dwBarNum; i ++)
    {
    pdevinfo-> .dwFlag BarInfo [i] =
    DevTable [JC]. DevInfo.BarInfo [i] .dwFlag;
    pdevinfo-> .dwSize BarInfo [i] =
    DevTable [JC]. DevInfo.BarInfo [i] .dwSize;
    }

    Return PCICORE_SUCCESS;
    }

    As an attachment, there is the Info.vi device Get trying to access this feature. The code crashes when the function is called.

    I have probably not pass parameters of data properly to COLD LAKE.

    Thank you for your lights.

    An array of fixed size in C is equivalent to a cluster of LabVIEW that contains the same number of identical items, replace the table with a cluster. In addition, structs are always passed by reference and the C function expects a pointer to a structure, you don't need to unbundle. Skip the cluster to function as a single parameter. Try the attached revised version of your VI.

  • My Mac Pro early 2009 has two non-functional engravers.

    Reader superdrive in my Mac Pro and a Blu - Ray player are not recognized now. They were in the past. My OS is upgraded 10.11.5. I would appreciate any advice.

    < removed by host of personal information >

    -You say engravers.  Readers read the CD or DVD?

    -Is one or more optical drives?

    -They are readers Apple?

    -What happens when you insert a CD or a DVD?

    -Do they not show in System Profiler under burning drive? You should see the chipset in the enclosure, as well as the HD itself

    OS X: about system information and System Profiler - Apple Support

    https://support.Apple.com/en-us/HT203001

    -Try to reset memory NVRAM/PRAM and SMC

    MacIntel: Reset of the controller (SMC) system management

    https://support.Apple.com/en-us/HT201295

    Subject of memory NVRAM and PRAM

    https://support.Apple.com/en-us/HT204063

    -Try to start safe mode

    OS x: what is Safe Boot, Safe Mode?

    https://support.Apple.com/en-us/HT201262

    -Start to recovery and repair the startup disk

    OS X: on OS X Recovery - Apple Support

    https://support.Apple.com/en-us/HT201314

    -If it is repairable reinstall the OSX

    How to reinstall OS X on your Mac - Apple Support

    https://support.Apple.com/en-us/HT204904

    -If you do not have a backup using disk utility to restore the internal drive to an external drive, so that you can try to recover the data.

    Format the boot disk and then do a fresh install of Mac OS x

  • PL/SQL FUNCTION: Passage date &amp; string as parameter

    Hello

    I have a situation where I have to convert the ISO date format Date [YYYY-MM - DDTHH24:MI]

    Is function def. : FN_ISO (IN_DATE Varchar2, Varchar2 IN_TIME)

    Front-end for the date and time, I can enter in 3 different ways.

    Input 1. what date / time is completely known

    Date: 5 April 2015

    Time: 23:56

    Input 2. When the date is known, but the time is unclear (the hour is UNK)

    Date: 5 April 2015

    Time: UNK:56

    Entry 3. When the date and time are unknown (month is UNK)

    Date: 05-UNK-2015

    Time: UNK:56

    Here, I am facing the problem with the Time parameter. Please find below scenarios:

    Scenario 1: If the time is complete (as input 1) then I'll pass the data type Date in 2nd parameter (5 April 2015, which contains the time internally)

    Scenario 2: If the time is incomplete or partially known (as input 2) then I'll pass the Varchar2 data type in 2nd parameter (UNK:56 as string)

    Problem statement:

    Consider scenario 1; If date & time is over so I'm passing the data type Date (April 5, 2015 23:56) Varchar2, then time will be 5 April 2015 00:00, however I need to get the time (23:56)

    Note:

    -I can't use the overload of functions.

    -I can not change the way call function which I now call.

    -I can't do second parameter date because in scenario 2 I have to pass the string "UNK:56".

    Please suggest me, how I can address the issue. Your help would be very appreciated.

    Thanks in advance!

    create or replace function fun_iso (IN_DATE VARCHAR, IN_TIME VARCHAR2 )  return varchar2
    is
    V_ISO varchar2(20);
    begin
    SELECT 
        (case when 
                   regexp_like(IN_DATE,'(UNK|\d+)/(UNK|\d+)/(UNK|\d+)') THEN 
                   REGEXP_REPLACE((REGEXP_REPLACE(translate(in_date||' '||in_time,'/ ','-T'),'UNK|NUL','-')),'(:|-|T)+$')
                   WHEN regexp_like(IN_DATE,'\d+-(\w+|\d+)-(\d+)') then
                   REGEXP_REPLACE((REGEXP_REPLACE(translate(TO_char(to_date(IN_DATE,'DD-MM-YY'),'YYYY-MM-DD')||' '||
          /*for scenario 1*/    (CASE 
                             WHEN regexp_like(IN_TIME,'(\d+)-(\w+)-(\d+)') 
                             THEN DECODE(TO_CHAR((IN_TIME),'HH24:MI:SS'),'00:00:00', NULL,TO_CHAR(IN_TIME,'HH24:MI:SS'))  /* Here i need time if i will pass 05-Apr-2015*/
                             ELSE NULL
                                  END) 
                   ,'/ ','-T'),'UNK|NUL','-')),'(:|-|T)+$')
                   else '0'
         END)
         INTO V_ISO from dual;
         RETURN V_ISO;     
    end;
    /
    
    /* Use below table : line 35 is scenario 1 */
    
    select a.*, fun_iso(IN_DATE, IN_TIME)
    FROM 
    (
    (SELECT '2015-01-15T22:29:59 ' ISO_DATE_TIME, '2015/05/05' IN_DATE , '22:29:59' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, 'UNK/UNK/UNK' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '01-Jan-15' IN_DATE , '22:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '01-Jan-1948' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '01-05-15' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    SELECT ' ' ISO_DATE_TIME, '25-05-2015' IN_DATE , '22:29:NUL' IN_TIME FROM DUAL UNION
    --SELECT ' ' ISO_DATE_TIME, '25-05-2015' IN_DATE , TO_CHAR(TO_DATE('01-AUG-14 23:56:00','DD-Mon-YY HH24:MI:SS')) IN_TIME FROM DUAL UNION
    SELECT '2009' ISO_DATE_TIME, '2009/UNK/UNK' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '2009---25' ISO_DATE_TIME, '2009/UNK/25' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '--03-25' ISO_DATE_TIME, 'UNK/03/25' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '--03--T-:15' ISO_DATE_TIME, 'UNK/03/UNK' IN_DATE , 'UNK:15:NUL' IN_TIME FROM DUAL UNION
    SELECT '2009-03 ' ISO_DATE_TIME, '2009/03/UNK' IN_DATE , 'UNK:UNK:NUL' IN_TIME FROM DUAL UNION
    SELECT '2009-03--T12' ISO_DATE_TIME, '2009/03/UNK' IN_DATE , '12:UNK:NUL' IN_TIME FROM DUAL )
     ) a;
    

    Hello

    Here's one way:

    FUNCTION to CREATE or REPLACE fun_iso

    (in_date in VARCHAR2

    in_time IN VARCHAR2

    )

    RETURN VARCHAR2

    DETERMINISTIC

    IS

    month_name VARCHAR2 (51): = ' JAN Feb MAR Apr MAY June July Aug SEP OCT NOV DEC UNK;

    month_num VARCHAR2 (50): = '01 02 03 04 05 06 07 08 09 10 11 12-';

    BEGIN

    RETURN SUBSTR (in_date,-4)

    || '-'

    || SUBSTR (month_num

    INSTR (month_name

    , SUBSTR (in_date, 4, 3)

    )

    2

    )

    || '-'

    || SUBSTR (in_date, 1, 2)

    || ' T '

    || CASE

    WHEN SUBSTR (in_time, 1, 3) = "UNK".

    THEN '-'

    Of OTHER SUBSTR (in_time, 1, 2)

    END

    || '-'

    || SUBSTR (in_time-2)

    ;

    END fun_iso;

    /

    If your needs are more complex, you can do this drill several assignments, where you build a string a little at a time, and RETURN this string at the end.

  • Using the data logged in an interface with the aggragate function

    Hello

    I'm trying to use logged data from a source table in one of my interfaces in ODI. The problem is that one of the mappings on the columns target implies a function (sum) overall. When I run the interface, I get an error saying not "a group by expression. I checked the code and found that the columns jrn_subscriber, jrn_flag, and jrn_date are included in the select statement, but not in the group by statement (the statement group contains only remiaining two columns of the target table).

    Is there a way to get around this? I have to manually change the km? If so how would I go to do it?

    Also I'm using Oracle GoldenGate JKM (OGG oracle for oracle).

    Thanks and really appreciate the help

    Ajay

    "ORA-00979"when the CDC feature (logging) using ODI with Modules of knowledge including the aggregate SQL function works [ID 424344.1]
    Updated 11 March 2009 Type status MODERATE PROBLEM

    In this Document
    Symptoms
    Cause
    Solution
    Alternatives:

    This document is available to you through process of rapid visibility (RaV) of the Oracle's Support and therefore was not subject to an independent technical review.

    Applies to:
    Oracle Data Integrator - Version: 3.2.03.01
    This problem can occur on any platform.
    Symptoms
    After successfully testing UI integration ODI using a function of aggregation such as MIN, MAX, SUM, it is necessary to implement change using tables of Journalized Data Capture operations.

    However, during the execution of the integration Interface to retrieve only records from Journalized, has problems to step load module loading knowledge data and the following message appears in the log of ODI:

    ORA-00979: not a GROUP BY expression
    Cause
    Using the two CDC - logging and functions of aggregation gives rise to complex problems.
    Solution

    Technically, there is a work around for this problem (see below).
    WARNING: Problem of engineers Oracle a severe cautioned that such a type of establishment may give results that are not what could be expected. This is related to how ODI logging is applied in the form of specific logging tables. In this case, the aggregate function works only on the subset that is stored (referenced) in the table of logging and on completeness of the Source table.

    We recommend that you avoid this type of integration set ups Interface.
    Alternatives:

    1. the problem is due to the JRN_ * missing columns in the clause of "group by" SQL generated.

    The work around is to duplicate the knowledge (LKM) loading Module and the clone, change step "Load Data" by editing the tab 'Source on command' and substituting the following statement:
    <%=odiRef.getGrpBy()%>

    with
    <%=odiRef.getGrpBy()%>
    <%if ((odiRef.getGrpBy().length() > 0) && (odiRef.getPop("HAS_JRN").equals("1"))) {%>
    JRN_FLAG, JRN_SUBSCRIBER, JRN_DATE
    <%}%>

    2. it is possible to develop two alternative solutions:

    (a) develop two separate and distinct integration Interfaces:

    * The first integration Interface loads the data into a temporary Table and specify aggregate functions to use in this initial integration Interface.
    * The second integration Interfaces uses the temporary Table as Source. Note that if you create the Table in the Interface, it is necessary to drag and drop Interface for integration into the Source Panel.

    (b) define the two connections to the database so that separate and distinct references to the Interface of two integration server Data Sources (one for the newspaper, one of the other Tables). In this case, the aggregate function will be executed on the schema of the Source.

    Display related information regarding
    Products

    * Middleware > Business Intelligence > Oracle Data Integrator (ODI) > Oracle Data Integrator

    Keywords
    ODI; AGGREGATE; ORACLE DATA INTEGRATOR; KNOWLEDGE MODULES; CDC; SUNOPSIS
    Errors
    ORA-979

    Please find above the content of the RTO.
    It should show you this if you search this ID in the Search Knowledge Base

    See you soon
    Sachin

  • SQL statement by using the min aggregate function result extract a line - how?

    Need help, try to do something seemingly simple. I'll give a simple example to illustrate the problem.

    I'll use a simple table of addresses with 4 fields.

    Create the table:
      CREATE TABLE "ADDRESSES" 
       (     "OWNER_NAME" VARCHAR2(20 BYTE), 
         "STREET_NAME" VARCHAR2(20 BYTE), 
         "STREET_NUMBER" NUMBER
       ) ;
    complete with 6 rows
    Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('FRED','MAIN',1);
    Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JOAN','MAIN',2);
    Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JEAN','MAIN',3);
    Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JACK','ELM',1);
    Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JANE','ELM',2);
    Insert into ADDRESSES (OWNER_NAME,STREET_NAME,STREET_NUMBER) values ('JEFF','ELM',3);
    We now have this:
    Select * from addresses
    OWNER_NAME           STREET_NAME          STREET_NUMBER          
    -------------------- -------------------- ---------------------- 
    FRED                 MAIN                 1                      
    JOAN                 MAIN                 2                      
    JEAN                 MAIN                 3                      
    JACK                 ELM                  1                      
    JANE                 ELM                  2                      
    JEFF                 ELM                  3                      
    
    6 rows selected
    Now, I want to group by street name and obtain a number of houses. At the same time, I would like to know the number of the first and the last House
        select
        street_name,
        count(*) "NBR HOUSES",
        min(street_number) "First Number",
        max(street_number) "Last Number"
         from addresses
        group by street_name
    
    produces
    
    STREET_NAME          NBR HOUSES             First Number           Last Number            
    -------------------- ---------------------- ---------------------- ---------------------- 
    ELM                  3                      1                      3                      
    MAIN                 3                      1                      3                      
    
    2 rows selected
    Excellent. Now for the problem. I would also like to list on each line, the owner who lives at number House first and/or the last. It should be noted, assume that the name of the street and the number is unique

    It seems I have everything that I need. Don't know how to get home.

    I tried:
    select
        street_name,
        count(*) "NBR HOUSES",
        min(street_number) "First Number",
        max(street_number) "Last Number",
        (Select b.owner_name from addresses b where b.street_number = min(street_number) and b.owner_name = owner_name) "First Owner"
         from addresses
        group by street_name
    But getting a syntax error sql group function unauthorized when I add the subselect statement.

    any ideas?

    Thanks for any help.

    Published by: user6876601 on November 19, 2009 19:08

    Published by: user6876601 on November 19, 2009 19:30

    Hello

    Welcome to the forum!

    Get the minimum and maximum number for each street is a pretty simple concept; simpler to describe and simple to code.
    Now you want to the owner_name associate the maximum and minimum, which is a concept more complex; a little more difficult to describe and, unfortunately, much less simple to code and much, much more difficult to explain:

    select
        street_name,
        count (*)                "NBR HOUSES",
        min (street_number)      "First Number",
        min (owner_name) KEEP (DENSE_RANK FIRST ORDER BY street_number)
                        "First Owner",
        max (street_number)      "Last Number",
        min (owner_name) KEEP (DENSE_RANK LAST ORDER BY street_number)
                        "Last Owner"
         from addresses
        group by street_name
    ;
    

    You will notice that I used min for "Original owner" and "last owner". Why is this?
    The key word in these functions is the FIRST or the LAST word that comes after DENSE_RANK and before ORDER BY. The function at the beginning is simply a break.

    In other words, MIN in this context refers only to what needs to happen when there is a link to the first or last in the group. Even if such a thing is impossibe in your data, generic functions must have a mechanism to return a single owner_name when two or more rows have an equal right to having the highest street_number. For example, if we change the address of Joan in 1 hand, then MIN (street_number) is always 1, of course, but who is the person associated with the minimum street_number: Fred or Joan? Both have an equal claim that he owns with the smallest address on Main Street, but aggregate functions must return a single value, so we must have a mechanism to indicate to the system, whether to return 'JOAN' or 'FRED '. In this example, I arbitrarily in the network said een of tie, the lowest name, in alphabetical order, must be returned. In this case, 'FRED' would return, "FRED" prior to "JOAN".

    Thank you for including CREATE TABLE and INSERT!

  • Function to validate the hour

    «I got this feature to a friend, to validade the text field where the time format of type user as 11:30:45 ' with: "... but, this function just works, if the format is just time/min... do not work to the hour/min/segs... I have difficulty this also works with the seconds...»

    If anyone can help in what should be changed...

    -----------------------------------------------------------------------------------------------------
    create or replace FUNCTION verifica_hora_min(
      p_campo IN VARCHAR2
    )
    RETURN BOOLEAN
    IS
    v_texto varchar(5);
    v_texto1 varchar2(2);
    v_texto2 varchar2(2);
    v_valor1 number;
    v_valor2 number;
    v_palavra varchar2(75);
    v_compara1 varchar2(30);
    v_compara2 varchar2(30);
    BEGIN
    v_palavra := 'ABCDEFGHIJKLMNOPQRSTUVXYWZabcdefghijklmnopqrstuvxywz*/\|<>.,+-{}[]!?%$&^~; ';
    v_texto := p_campo;
    
    IF(v_texto IS NOT NULL)THEN
    FOR i in 1..LENGTH(v_texto)LOOP
        v_compara1 := SUBSTR(v_texto, i,1);
           FOR j in 1..LENGTH(v_palavra) LOOP
                v_compara2 := SUBSTR(v_palavra, j,1);
                IF(v_compara1 = v_compara2)THEN
                  RETURN FALSE;
                END IF;
           END LOOP;
    END LOOP;
    
    IF(INSTR(v_texto,':') = 3) AND LENGTH(v_texto) = 5
    AND INSTR(SUBSTR(v_texto,INSTR(v_texto,':')+1), ':') = 0
    THEN
      v_texto1 := SUBSTR(v_texto, 1,2);
      v_texto2 := SUBSTR(v_texto, 4,5);
    
      v_valor1 := TO_NUMBER(v_texto1);
      v_valor2 := TO_NUMBER(v_texto2);
      IF(v_valor1 > 23) OR (v_valor2 > 59)THEN
      return FALSE;
      ELSE
      return TRUE;
      END IF;
    
      ELSE
      return FALSE;
      END IF;
    
    ELSE
       return TRUE;
    END IF;
    EXCEPTION
      WHEN OTHERS THEN
        RETURN FALSE;
    END;
    ----------------------------------------------------------------------------------

    tnks a lot

    Published by: brugo 10/28/2009 08:00

    And what you have tried so far?
    Where is your attempt to implement this really bad past?

    I must say it seems awfully complex for validation of time. Can not just do something like

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace FUNCTION verifica_hora_min(p_campo IN VARCHAR2) RETURN BOOLEAN IS
      2    v_date DATE;
      3  BEGIN
      4    v_date := TO_DATE(p_campo,'HH24:MI:SS');
      5    RETURN TRUE;
      6  EXCEPTION
      7    WHEN OTHERS THEN
      8      RETURN FALSE;
      9* END;
    SQL> /
    
    Function created.
    
    SQL> declare
      2    v_test BOOLEAN;
      3  begin
      4    v_test := verifica_hora_min('10:20:30');
      5    dbms_output.put_line(CASE WHEN v_test THEN 'TRUE' ELSE 'FALSE' END);
      6    v_test := verifica_hora_min('10:70:30');
      7    dbms_output.put_line(CASE WHEN v_test THEN 'TRUE' ELSE 'FALSE' END);
      8    v_test := verifica_hora_min('XX:XX:XX');
      9    dbms_output.put_line(CASE WHEN v_test THEN 'TRUE' ELSE 'FALSE' END);
     10  END;
     11  /
    TRUE
    FALSE
    FALSE
    
    PL/SQL procedure successfully completed.
    

    Published by: BluShadow on October 28, 2009 15:11
    removed the unnecessary code

Maybe you are looking for