How to convert prescaled to postscaled values with custom scale?

Hi,
Is there any way to convert between prescaled and postscaled values using an arbitrary custom scale (i.e. linear, map, polynomial, or table)? 
I'm trying to write a driver which allows users to choose an arbitrary (previously defined) custom scale, but I need to know within the program the values which are actually output/input, which means I need a way of determining the max/min values for an arbitrary custom scale based on the known unscaled max/min.  Surely there is a NI-DAQ internal function which accomplishes this task, but there doesn't seem to be a VI for it.
Any ideas?
-Lee
Labview version 9.0f3

Dustin,
Thanks again for your suggestion.  I'm sure your example will be useful to others, but I'm afraid it doesn't actually address my question.  I guess I'm not being very clear.
The point is that I want to keep track of the values currently being sourced on my analog output channels.  In my application, users can specify max and min values for the sources, which may reflect the hardware limits of the device (e.g. +/-10V in my case) or a more constrained set of software limits determined by whatever the channel is driving.  If the user tries to write a value outside this range, it will be coerced and the limiting value will be sourced instead (without generating an error in this case).  It is then this limiting value which should be saved in output memory, rather than the out-of-range value requested, to avoid users believing they have sourced a value they have not.
If I then allow users to choose a custom scale, then the requested values are given in scaled units, while the device max and min are still unscaled (volts).  This means I need a way to convert the unscaled limits to scaled limits based on an arbitrary custom scale in order to accomplish the procedure described above.  I have attached an example VI that handles linear scales only.  Obviously this could be extended by adding a case structure to handle the other types of scales, but it just seemed a bit silly to me that there is no VI to accomplish this scaling already, given that it most certainly happens inside the various NI-DAQmx routines that accept custom scales.
Much of this would also be easier if it were possible to 'read back' the currently sourced value from DAQ output channels, so I wouldn't have to fake it by keeping a local memory of them, but that is a separate issue.
-Lee 
Attachments:
ApplyScaledLimitsExample.vi ‏23 KB

Similar Messages

  • How Can I replace newScale Text Strings with Custom Values?

    How Can I replace newScale Text Strings with Custom Values?
    How can I replace newScale text strings with custom values?
    All  newScale text is customizable. Follow the procedure below to change the  value of any text string that appears in RequestCenter online pages.
    Procedure
    1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
    a) Navigate to the RequestCenter.ear/config directory.
    b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
    c) Save the file.
    d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
    e) Stop and restart the RequestCenter service.
    f) Log  in to RequestCenter and browse to the page that has the text you want  to overwrite. In front of the text you will now see the String ID.
    g) Note down the String ID's you want to change.
    2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
    3. Create the following sub-directory: res/resources
    4. Create the following empty text files in the directory you just created:
    RequestCenter_0.properties
    RequestCenter_1.properties
    RequestCenter_2.properties
    RequestCenter_3.properties
    RequestCenter_4.properties
    RequestCenter_5.properties
    RequestCenter_6.properties
    RequestCenter_7.properties
    5. Add the custom text strings to the appropriate  RequestCenter_<Number>.properties file in the following manner  (name-value pair) StringID=YourCustomTextString
    Example: The StringID for "Available Work" in ServiceManager is 699.
    If you wanted to change "Available Work" to "General Inbox", you  would add the following line to the RequestCenter_0.properties file
         699=General Inbox
    Strings are divided into the following files, based on their numeric ID:
    Strings are divided into the following files, based on their numeric ID:
    String ID  File Name
    0 to 999 -> RequestCenter_0.properties
    1000 to 1999 -> RequestCenter_1.properties
    2000 to 2999 -> RequestCenter_2.properties
    3000 to 3999 -> RequestCenter_3.properties
    4000 to 4999 -> RequestCenter_4.properties
    5000 to 5999 -> RequestCenter_5.properties
    6000 to 6999 -> RequestCenter_6.properties
    7000 to 7999 -> RequestCenter_7.properties
    6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
    7. Restart RequestCenter.
    Your customized text should be displayed.

    I've recently come across this information and it was very helpful in changing some of the inline text.
    However, one place that seemed out of reach with this method was the three main buttons on an "Order" page.  Specifically the "Add & Review Order" button was confusing some of our users.
    Through the use of JavaScript we were able to modify the label of this button.  We placed JS in the footer.html file that changes the value of the butt

  • How can I get the element value with namespace?

    I tried to get a element value in xml has namespace but i can't.
    I removed the namespace, i can get a element value.
    How can i get a element value with namespace?
    --1. Error ----------- xml ------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    *<TaxInvoice xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0 http://www.kec.or.kr/standard/Tax/TaxInvoiceSchemaModule_1.0.xsd">*
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    --2. sucess ----------- xml ---------remove namespace---------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <TaxInvoice>
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    ---------- program ------------
    procedure insert_table
    l_clob clob,
    wellformed out boolean,
    error out varchar2
    is
    l_parser dbms_xmlparser.Parser;
    xmldoc xmldom.domdocument;
    l_doc dbms_xmldom.DOMDocument;
    l_nl dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    l_root DBMS_XMLDOM.domelement;
    l_node DBMS_XMLDOM.domnode;
    l_node2 DBMS_XMLDOM.domnode;
    l_text DBMS_XMLDOM.DOMTEXT;
    buf VARCHAR2(30000);
    xmlparseerror exception;
    TYPE tab_type is Table of xml_upload%ROWTYPE;
    t_tab tab_type := tab_type();
    pragma exception_init(xmlparseerror, -20100);
    l_node_name varchar2(300);
    begin
    l_parser := dbms_xmlparser.newParser;
    l_doc := DBMS_XMLDOM.newdomdocument;
    dbms_xmlparser.parseClob(l_parser, l_clob);
    l_doc := dbms_xmlparser.getDocument(l_parser);
    l_n := dbms_xmldom.makeNode(l_doc);
    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');
    FOR cur_tax In 0..dbms_xmldom.getLength(l_nl) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl, cur_tax);
    t_tab.extend;
    t_tab(t_tab.last).ed_id := '5000000';
    dbms_xslprocessor.valueOf(l_n, 'IssueID/text()', t_tab(t_tab.last).tid_issue_id);
    dbms_xslprocessor.valueOf(l_n, 'TypeCode/text()', t_tab(t_tab.last).tid_type_code);
    END LOOP;
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO xml_upload VALUES t_tab(i);
    COMMIT;
    dbms_xmldom.freeDocument(l_doc);
    wellformed := true;
    exception
    when xmlparseerror then
    --xmlparser.freeparser(l_parser);
    wellformed := false;
    error := sqlerrm;
    end insert_table;

    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');try to change as follow
    l_nl := dbms_xslprocessor.selectnodes(l_n,'/TaxInvoice/TaxInvoiceDocument','xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0"');Edited by: AlexAnd on Aug 17, 2011 12:36 AM

  • How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    You've probably found an answer to this by now, but I think this has been addressed in another forum -- The link below suggested using a button and adding the tooltip to the button. 
    https://forums.adobe.com/thread/304974?start=0&tstart=0
    Sounds like it would work but I haven't actually tried it. 
    Good luck~!

  • How to convert a number to FLOAT with 9 decimal values.

    Hi all,
    I need to convert a number like '10.02' to a floating point number with 9 decimal values like '10.022111221'. I think that the right function is TO_BINARY_FLOAT, but how can I obtain 9 decimal values? If I use the following syntax:
    select TO_BINARY_FLOAT(num) from table
    I obtain a floating point values with a variable number of decimal numbers after the ".", instead I need 9 number after ".".
    Regards,
    Maurizio.

    Hi,
    the number I need to select is the result of a product, for example:
    select (Num_A * Num_B) from Table;
    Num_A has 2 decimal numbers, like 12.01 and Num_B could be: 12.111111111.
    Now, Num_A * Num_B = 653.999999994
    but I issue:
    select TO_BINARY_FLOAT(54.00 * 12.111111111) from Table
    I obtain:
    654, a rounded value, but I need 653.999999994.

  • How to convert dynamic disk into basic, with OS installed in C drive????

    Hi,
    I want to convert all volumes of my current hard drive (which includes OS installed in it) into basic from dynamic. 
    I read the tutorial of microsoft, in which they said that delete all volumes one by one and then finally convert the disk into basic.
    So I deleted 2 volumes, but OS did not let me delete C drive, as windows 8 was installed in it.
    So now how to convert my hard disk into basic disk from dynamic disk???

    Hi,
    I want to convert all volumes of my current hard drive (which includes OS installed in it) into basic from dynamic. 
    I read the tutorial of microsoft, in which they said that delete all volumes one by one and then finally convert the disk into basic.
    So I deleted 2 volumes, but OS did not let me delete C drive, as windows 8 was installed in it.
    So now how to convert my hard disk into basic disk from dynamic disk???
    find another hard disk, backup and wipe the old disk, then use windows to make sure any partitions remaining are gone
    windows will automatically allocate the disk as required on a new install
    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!
    Hardcore Games Legendary is the Only Way to Play!

  • How to set physical min/max values for a scale in xy graph?

    Hello,
    I have troubles with the way LabView handles physical units in xy graphs. In particular, I use a time scale for the x axis.
    The values are timestamps and have the unit [s]. Now I want to read write the min max values for this scale via
    property nodes. It seems that the properties for min max do not support the use of the unit I use for the data for
    that same axis. This is very inconvenient and I am not even sure which kind of data to use at all for this properties.
    Is it simply converting to/from [s] using the unit converter?
    (I am using LabView 7.1 for the programm in question).
    Thanks,
    Olaf

    Hi Olaf
    "It seems that the properties for min max do not support the use of the unit I use for the data for that same axis."  
    What are the units you are using? can you make it a littlebit clear.
    You can change the units also using Property node.
    Just check the attachment once. If that is what you are looking for, then the problem is solved.
    Regards
    Anil
    Message Edited by reddy on 05-23-2006 05:25 AM
    Message Edited by reddy on 05-23-2006 05:27 AM
    Attachments:
    X-Scale.jpg ‏8 KB

  • How to Create a multiefield in CQ with custom type?

    Please can anyone guide me to create a multiefield component with custom xtypes...

    Hi Karthi,
    Bellow you find some example code for custom multifield
    * @class CQ.wcm.QuestionsBlock
    * @extends CQ.form.CompositeField
    * The filter rule field lets the user select "include" or "exclude" and enter a regexp
    * @constructor
    * Creates a new QuestionsBlock.
    * @param {Object} config The config object
    CQ.wcm.QuestionsBlock = CQ.Ext.extend(CQ.form.CompositeField, {
         * @private
         * @type CQ.Ext.form.TextField
        hiddenField: null,
         * @private
         * @type CQ.Ext.form.TextField
        questionsblocktitle: null,
         * @private
         * @type CQ.Ext.form.NumberField
        questionsnumber: null,
        constructor: function(config) {
            var formCfg = {"trackLabels":true,"type":"form"};
            config = config || { };
            var defaults = {
                    "border": true,
                    "layout":  formCfg,
                    "padding": "7px",
                    "stateful": false,
                    "autoWidth": true,
                    "align": "left"
            config = CQ.Util.applyDefaults(config, defaults);
            CQ.wcm.QuestionsBlock.superclass.constructor.call(this, config);
        // overriding CQ.Ext.Component#initComponent
        initComponent: function() {
            CQ.wcm.QuestionsBlock.superclass.initComponent.call(this);
            this.hiddenField = new CQ.Ext.form.Hidden({
                "name": this.name,
                "stateful": false
            this.add(this.hiddenField);
            this.questionsblocktitle= new CQ.Ext.form.TextField({
                "fieldLabel": "Question Block Title",
                "allowBlank":false,
                "stateful": false,
                "mode": 'local',
                "name": 'questionsblocktitle',
                "width": '230px',
                'labelStyle': 'width:120px;'
            this.add(this.questionsblocktitle);
            this.questionsnumber= new CQ.Ext.form.NumberField({
                "fieldLabel": "Question Number",
                "stateful": false,
                "allowBlank":false,
                "mode": 'local',
                "name": 'questionsnumber',
                'labelStyle': 'width:120px;',
                "width": '230px'
            this.add(this.questionsnumber);
        // overriding CQ.form.CompositeField#setValue
        setValue: function(value) {
            var vArray = value.split(";");
            this.questionsblocktitle.setValue(vArray[0]);
            this.questionsnumber.setValue(vArray[1]);
        // overriding CQ.form.CompositeField#getValue
        getValue: function() {
            return this.getRawValue();
        // overriding CQ.form.CompositeField#getRawValue
        getRawValue: function() {
            var questionsblocktitle= this.questionsblocktitle.getValue();
            var questionsnumber= this.questionsnumber.getValue();
            var value = questionsblocktitle+ ";" + questionsnumber;
            this.hiddenField.setValue(value);
            return value;
         * Loads the options of the selection if an optionsProvider is available.
         * This method is usually called solely by {@link CQ.Dialog} after its
         * content has been loaded.
         * @param {String} path content path (optional)
         * @private
        processPath: function(path) {
            var dialogPath = this.findParentByType("dialog").path;
            this.doLayout();
    // register xtype
    CQ.Ext.reg('questionsblock', CQ.wcm.QuestionsBlock);
    Regards,
    kasq

  • HELP - How can I default PDF printing to use Custom Scale 97%?

    We just upgraded an old computer to new hardware.  The old machine automatically defaulted all PDFs to print to Custom Scale 97%.  Because of our letterhead it's critical that this value remain defaulted to prevent wasting large amounts of stock.  How can we default this setting again in Reader XI?

    As an update, I got this working on my local machine.  Unfortunately it isn't taking on the print machine yet.  I made the following registry changes:
    bprintExpandToFit (1)
    bprintSetPageSize (97)
    bprintScaling (2)
    Locally it works using version 11.0.06.  The print machine keeps re-setting the registry values however.
    Any help would be GREATLY appreciated.

  • How to convert MM:SS into Seconds with varying values of Minutes length.

    I have one table in Oracle where there is one Column "Duration" and it is having entries like
    59:00,
    30:00,
    59:05
    30
    120:45
    etc.
    These entries are in Minutes and Seconds with MM:SS Format.Where MM:SS stands for Minute and SS is seconds only.
    Minutes can be of Length 1 (i.e. 01:00) of Length 2 (18:00) of Length 3 (i.e. 200:00) of Length 4 (i.e. 1440:00).
    I need to convert these Minutes (MM:SS) only into Seconds and want seconds as it is using SQL Query.
    Note:-Here Duration will be in MM:SS format like 65:06,100:00,1200:30
    Minutes or it can be in seconds also 50,30 etc.
    DURATION column is VARCHAR2 and database is Oracle.
    Please suggest SQL Query and help me to convert it as it is needed badly.
    Thanks in Advance for Help and Inputs.Looking forward for all kind of Help.

    What yaar..
    I fforgot to multiply with 60
    sql>
    select duration,nvl(to_number(substr(duration,1,instr(duration,':')-1)),0)*60 mts_to_sec,
        nvl(to_number(substr(duration,1,instr(duration,':')-1)),0)*60+
         to_number(substr(duration,decode(instr(duration,':'),0,1,instr(duration,':')+1))) tot_sec
    from t;
    DURATION MTS_TO_SEC TOT_SEC 
    1:30     60     90 
    10:30    600    630 
    100:00   6000   6000 
    5512     0      5512
    08:30    480    510 
    1440:00  86400  86400
    Message was edited by:
            jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • LOVs and how to substitute a database driven value with a more readable val

    Hello,
    I am using LOVS in my view objects and I like it because it is saving me time whille developing my UI: I get drop down list made automatically for me in my UI forms.
    However I have a requirement to change the values we see in the drop down today.
    Basically the values that show in the drop down are database driven and they are not very readable for the end users, so I would like to somehow convert them with some values that I know would make more sense.
    Let say in my database I have a fiield name type that can be G for general or S for Specific, I would like the user to see General or Specific in the drop down list instead of G or S. How would you do that and can LOVs be configured to do that?
    Thanks

    there is something called display attribute when you create your lov in the ui hints tab..
    you have shuttle the description for the code to the selected pane. .so that you see the description instead of the code that is bounded for the lov attribute..
    http://blogs.oracle.com/workingwithadf/entry/adf-bc_creating_a_listofvalues_lov_and_a_cascaded_lov
    https://lh6.googleusercontent.com/-LZExUnvVJAo/TXNp71j7VII/AAAAAAAAE3s/1ukcrJOrw2Y/s1600/4.png

  • How to represent a -1 numeric value with text?

    Hi All,
    Question: How do I get the value of negative one (-1) in a numeric column to display as "all"?
    Background: For our lottery players, they are able to opt in to various automated alerts.  One column is an integer value representing one of five different thresholds for sending an alert: 10,000, 50,000, 100,000, 500,000, and -1.  The -1 value
    actually represents all of the other 4 values, or simply "all thresholds," meaning "send me an alert at every one of these thresholds."
    What is the best way to represent the -1 value in the cube?  A user won't understand that -1 is equivalent to "all choices".  I could change the view so that the column is a string instead of an integer, but I assume this is going to
    affect the cube in a negative way, such as unexpected sorting, etc.
    I asked our resident SSAS guy if a numeric value could be displayed (not read) as "all values" while actually storing the -1 value, but all he could suggest was changing the data type and using a case statement to replace -1 with "all values." 
    This does not seem like a fix to me.
    Is there a way to make SSAS display a negative one value as "all choices" without changing the data type of the source column itself?
    Thanks,
    Eric B 

    Normally you would have a lookup on the number and a text value for the result displayed to users in the cube.
    KeyValue
    DisplayValue
    10000
    $10,000
    50000
    $50,000
    100000
    $100,000
    500000
    $500,000
    -1
    All Values

  • How can i open the "Convert to Indexed Color" dialog with custom presets?

    Hi,
    I need to automatically open the "Convert to Indexed Colors" dialog in Photoshop. Before and after that i have some scripts running so its not possible to open the dialog manually. Also i want to set some custom presets (like number of colors etc.).
    Found something similar to what i want for the Color Range selection (opens the dialog with the presets you put in):
    function colorrange(enabled, withDialog, fuzziness) {
        if (enabled != undefined && !enabled)
          return;
        var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
        var desc1 = new ActionDescriptor();
        desc1.putInteger(app.charIDToTypeID('Fzns'),fuzziness);
        var desc2 = new ActionDescriptor();
        desc2.putDouble(app.charIDToTypeID('Lmnc'), 31.22);
        desc2.putDouble(app.stringIDToTypeID("a"), 0.86);
        desc2.putDouble(app.stringIDToTypeID("b"), 0.31);
        desc1.putObject(app.charIDToTypeID('Mnm '), app.charIDToTypeID('LbCl'), desc2);
        var desc3 = new ActionDescriptor();
        desc3.putDouble(app.charIDToTypeID('Lmnc'), 95.34);
        desc3.putDouble(app.stringIDToTypeID("a"), 54.59);
        desc3.putDouble(app.stringIDToTypeID("b"), 49.85);
        desc1.putObject(app.charIDToTypeID('Mxm '), app.charIDToTypeID('LbCl'), desc3);
        desc1.putInteger(app.stringIDToTypeID("colorModel"), 0);
        var desc4 = new ActionDescriptor();
        var desc4 = executeAction(app.stringIDToTypeID('colorRange'), desc1, dialogMode);
    How can i achieve the same for the indexed color conversion dialog? Apart from doing a lot of guessing regarding the stringIDs.
    Is there some kind of "lookup table" for char and string IDs?
    Thank you guys in advance! This forum has been a great help many times.

    Ok never mind i got it, stupid me.
    Recorded it with Script Listener and changed the "DialogMode" parameter of the executeAction function from "DialogModes.No" to "DialogModes.All".
    var idCnvM = charIDToTypeID( "CnvM" );
                var desc249 = new ActionDescriptor();
                var idT = charIDToTypeID( "T  " );
                    var desc250 = new ActionDescriptor();
                    var idPlt = charIDToTypeID( "Plt " );
                    var idClrP = charIDToTypeID( "ClrP" );
                    var idSele = charIDToTypeID( "Sele" );
                    desc250.putEnumerated( idPlt, idClrP, idSele );
                    var idClrs = charIDToTypeID( "Clrs" );
                    desc250.putInteger( idClrs, 4 );
                    var idFrcC = charIDToTypeID( "FrcC" );
                    var idFrcC = charIDToTypeID( "FrcC" );
                    var idNone = charIDToTypeID( "None" );
                    desc250.putEnumerated( idFrcC, idFrcC, idNone );
                    var idTrns = charIDToTypeID( "Trns" );
                    desc250.putBoolean( idTrns, false );
                    var idDthr = charIDToTypeID( "Dthr" );
                    var idDthr = charIDToTypeID( "Dthr" );
                    var idDfsn = charIDToTypeID( "Dfsn" );
                    desc250.putEnumerated( idDthr, idDthr, idDfsn );
                    var idDthA = charIDToTypeID( "DthA" );
                    desc250.putInteger( idDthA, 75 );
                var idIndC = charIDToTypeID( "IndC" );
                desc249.putObject( idT, idIndC, desc250 );
            executeAction( idCnvM, desc249, DialogModes.ALL ); //Change from NO to ALL

  • How to insert or update comparing values  with two or more table

    Hai All
    I have three or four table in my database.
    Table 1 Dailattend is the main table here i need to insert or update my data and the fieds are
    Emplcode number,attdate date, intime date,intrin date ,introut date, outtime date are the fields
    Table 2 acclempbarcode the fields are
    emplcode number ,barcode number ....etc
    so now my data is in text format and i have broke the date like this
    0011221100112200100320100815
    First 16 is barcode and next 8 is date and 4 is time and i have created a temp table and store the date and move to main table
    My problem is the main table dailattend has no barcode so when i am going to insert or update i need to check whether the barcode is match with the emplcode in the main table
    How can i write insert or update statement
    The data is like this
    00110022 is barcode,10-03-2010 is my date and 0815 is time so i need to insert into dailattend table so now i have emplcode in dailattend table so i need to compare the barcode belong the emplcode in the another table and i need to insert in the dailattend table
    Pls give me some solution with example
    Regards
    Srikkanth.M

    try somthing like this
    create table t1
    as
    select '0011221100112200' barcode,to_date('100320100815','ddmmyyyyhh24mi') dt
    from dual
      create table barcodetbl
      emplcode varchar2(2000)
      barcode varchar2(2000)
      datetime date
    merge into barcodetbl bc
    using( select  * from  t1) x
    on
    (bc.barcode = x.barcode)
    when matched
    then update
    set datetime = x.dt
    when not matched
    then
    insert (emplcode,barcode,datetime)
    values(1,x.barcode,x.dt)
    /didn't realize that barcode is not in the main table.
    something along the lines
    Table 1 Dailattend is the main table here i need to insert or update my data and the fieds are
    Emplcode number,attdate date, intime date,intrin date ,introut date, outtime date are the fields
    Table 2 acclempbarcode the fields are
    emplcode number ,barcode number ....etc
    merge into dailattend bc
    using( select  * from  t1, acclempbarcode ac where t1.barcode = ac.barcode) x
    on
    (bc.emplcode = x.emplcode)
    when matched
    then update
    set datetime = x.dt
    when not matched
    then
    insert (emplcode,datetime)
    values(1,x.dt)
    /Alvinder
    Edited by: alvinder on Mar 23, 2010 3:50 PM

  • How to convert colon separated column values in multiple rows in report

    Hi All,
    I want to display colon separated values from a column, in a multi row in report.
    For example i have a column1 in a table with value 'A:B:C' , column2 has value '1'.
    i want to show in a report three rows using these two columns like
    column1 column2
    A 1
    B 1
    C 1

    Here's one way:
    SQL> create table test (col1 varchar2(20), col2 number);
    Table created.
    SQL> insert all
      2    into test values ('A:B:C', 1)
      3    into test values ('Dg:Ezs', 2)
      4  select * from dual;
    2 rows created.
    SQL> select
      2    t.col2,
      3    regexp_substr(t.col1, '\w+', 1, t2.column_value) c1
      4  from test t,
      5    table(cast(multiset(select level
      6                        from dual
      7                        connect by level <= length(t.col1) - length(replace(t.col1, ':', '')) + 1
      8                       ) as sys.odcinumberlist )) t2
      9  order by 2, 1;
          COL2 C1
             1 A
             1 B
             1 C
             2 Dg
             2 Ezs
    SQL>Edited by: Littlefoot on Jan 31, 2012 10:13 AM

Maybe you are looking for

  • Image Print problem in PDF Reports

    Hi, I have imported a JPG image on the layout using Reports builder 6i using File -> Import -> Image. Once imported, this image is displayed correctly in the report layout editor. But, when I run this report (Pdf format) from Oracle Apps, this image

  • Standalone java applet

    Hello, I'm having problems trying to run a java applet (a .jar) from the desktop to read info from a software I have on my Palm. I'm not finding an applet launcher anywhere that another post said could be found in the Java folder in the Utilities fol

  • Problem in Payment Run with Debit Memos

    Hi Every one I am facing the problem in payment run in which vendor debitmemos were picked up but they are in the exception list. I was observing it in various vendors and have tested in QA that as well when there is an invoice to be paid these debit

  • Number of chars in the PR Release strategy

    Hello gurus How many chars are allowed in the PR   Release strategy? , Is it possible to set up the PR Release strategy with item wise and overall release. Thanks JJ

  • How to clean old safari bookmarks

    Hi, is there a fast way to clean old safari bookmarks, broken, duplicate, etc? Any free or cheap app? Thanks.