Incorrect data type when writing to FPGA Read/Write Control

I have run in to a problem this morning that is causing me substantial headache.  I am programming a CompactRIO chassis running in FPGA mode (not using the scan engine) with LabVIEW 2012.  I am using the FPGA Read/Write Control function to pass data from the RT Host to the FPGA Target.  The data the RT host is sending comes from a Windows host machine (acting as the UI) and is received by the RT Host through a network published variable.
The network published shared variable (shared between the RT and Windows system) is a Type Def cluster containing several elements, one of which is a Type Def cluster of fixed point numerics.  The RT system reads this shared variable and breaks out the individual elements to pass along to various controls on the FPGA code's front panel.  The FPGA's front panel contains a type def cluster (the same type def cluster, actually) of fixed point numerics.
The problem comes in the RT code.  After I read the shared variable I unbundle the cluster by name, exposing the sub-cluster of fixed point numerics.  I then drop an FPGA Read/Write Control on the RT block diagram and wire up the FPGA reference.  I left click on the FPGA Read/Write Control and select the cluster of fixed point numerics.  I wire these together and get a coercion dot.  Being a coercion dot hater, I hover over it the dot and see that the wire data type is correct (type def cluster of fixed point numerics), but the terminal data type is listed as a cluster containing a Boolean, code integer and source string, also known as an error cluster.  I delete the wire and check the terminal data type on the Read/Write Control, which is now correctly listed as a type def cluster of fixed point numerics.  Rewiring it causes the terminal to revert back to the error cluster.  I delete the wire again and right click on the terminal to add a control.  Sure enough, a type def cluster of fixed point numerics appears.  Right clicking and adding an indicator to the unbundle attached to the network shared variable produces the proper result.  So, until they are attached to each other, everything works fine.  When I wire these two nodes together, one spontaneously changes to a error cluster.
Any thoughts would be appreciated.

My apologies I never got back to responding on this.  I regret that now because I got it to work but never posted how.  I ran in to the exact same problem today and returned to this post to read the fix.  It wasn't there, so I had to go through it all over again.
The manifestation of the problem this time was that I was now reading from the Read/Write FPGA front panel control and writing to a network published shared variable.  Both of these (the published shared variable and the front panel control) were based on a strict type defined cluster, just like in the original post.  In this instance, it was a completely different cluster in a completely different project, so it was not a one-off thing.
In addition to getting the coercion dot (one instance becoming an error cluster, recall), LabVIEW would completely explode this time around.  If I saved the VI after changing type definition (I was adding to the cluster) I would get the following error:
Compile error.  Report this problem to N.I. Tech Support.  Copy cvt,csrc=0xFF
LabVIEW would then crash hard and shutdown without completing the save.  FYI, I'm running LabVIEW 12.0f3 32-bit.
If I would then reopen the RT code, the same crash would occur immediately, ad nauseam.  The only way to get the RT code to open was to change the type defined cluster back to the way it was (prior to adding the new element).
I didn't realize it last time around (what originally prompted this post), but I believe I was adding to a type def cluster when this occurred the first time.
So, how did I fix it this time around? By this point I tried many, many different things, so it is possible that something else fixed it.  However, I believe that all I had to do was to build the FPGA code that the RT code was referencing.  I didn't even have to deploy it or run it... I just had to build it.  My guess is that the problem was the FPGA Reference vi (needed to communicate with the FPGA) is configured (in my case) to reference a bit file.  When the development FPGA Main.vi ceases to match the bit file, I think that bad things happen.  LabVIEW seems to get confused because the FPGA Main.vi development code is up and shows the new changes (and hence has the updated type def), but when you ask the RT code to do something substantial (Open, Save, etc), it refers to the old bit file that has not yet been updated.  That is probably why the error getting thrown was a compile error.
I'm going to have to do an additional round of changes, so I will test this theory.  Hopefully I will remember to update this post with either a confirmation or a retraction.

Similar Messages

  • FPGA Read/Write Control Function Issues

    Hello all!  Rather new to using FPGA, but I have an interesting issue that's popping up.
    Currently pulling in RAW voltage data from a set of sensors (Pressure Transducers, Load Cells, etc) through a cRIO DAQ.  Have the FPGA file setup to pull in that data already and have the main VI and all the sub-VIs working just fine.
    What I'm trying to do is save the raw voltage data (TDMS files) on the lower level and the convert and display on the upper level so that I don't have to convert and save (speed up saving data).  So that leaves 3 distinct "levels/sections":
    On FPGA that pulls in the raw data
    On FPGA that saves the raw data
    Main VI that does all the controls/conversions/displays etc.
    Number two is where I'm having an issue.  I want to save all the data in parallel so I'm creating a save FPGA for the I/O devices (8 Relays to command solenoid valves, 3 Pressure Transducers, 1 Load Cell, 4 Thermocouples).
    The issue I'm having is when I use the FPGA Read/Write control to read in from the Target and save to the TDMS.  When I only use a single FPGA target reference the lines are broken, but as soon as I switch to two targets, it now works.
    I've attached a screen cap of the current problem.  The set-up on the bottom (with only one target) doesn't work.  But the second I add more than one target, it works.
    Any reason why it might be doing this?  Any ideas/suggestions at all on how to go about setting this up in general?
    Thanks!
    Attachments:
    FPGAError.jpg ‏35 KB

    HySoR,
    You might check the documentation for "data" terminal of "TDMS Write" (http://zone.ni.com/reference/en-XX/help/371361H-01/glang/tdms_file_write/). One DBL element is not accepted, but 1D DBL array is accepted.
    data is the data to write to the.tdmsfile. This input accepts the following data types:
    Analog waveform or a 1D array of analog waveforms
    Digital waveform
    Digital table
    Dynamic data
    1D or 2D array of:
    Signed or unsigned integers
    Floating-point numbers
    Timestamps
    Booleans
    Alphanumeric strings that do not contain null characters

  • FPGA Read/Write Control Issues

    Hello all!  Rather new to using FPGA, but I have an interesting issue that's popping up.
    Currently pulling in RAW voltage data from a set of sensors (Pressure Transducers, Load Cells, etc) through a cRIO DAQ.  Have the FPGA file setup to pull in that data already and have the main VI and all the sub-VIs working just fine.
    What I'm trying to do is save the raw voltage data (TDMS files) on the lower level and the convert and display on the upper level so that I don't have to convert and save (speed up saving data).  So that leaves 3 distinct levels/sections:
    On FPGA that pulls in the raw data
    On FPGA that saves the raw data
    Main VI that does all the controls/conversions/displays etc.
    Number two is where I'm having an issue.  I want to save all the data in parallel so I'm creating a save FPGA for each I/O device (8 Relays to command solenoid valves, 3 Pressure Transducers, 1 Load Cell, 4 Thermocouples).  To do this I want to create a separate VI for each device (not sure if that's a smart thing to do).
    The issue I'm having is when I use the FPGA Read/Write control to read in from the Target and save to the TDMS.  When I only use a single FPGA target reference the lines are broken, but as soon as I switch to two targets, it now works.
    Any reason why it might be doing this?  Any ideas/suggestions at all on how to go about setting this up in general?
    Thanks!

    Hi,
    HySoR wrote:
    The issue I'm having is when I use the FPGA Read/Write control to read in from the Target and save to the TDMS.  When I only use a single FPGA target reference the lines are broken, but as soon as I switch to two targets, it now works.
    Could you take a screenshot and post this part of your code? I'm having trouble understanding what you are describing.
    Craig H. | CLA | Systems Engineer | National Instruments

  • FPGA Read Write Control Coercion

    I am getting a coercion indication using a FPGA read write control.  I have attached a screen capture of the context help.  For some reason it is looking for an error cluster?
    Attachments:
    FPGA Coercion Context Help.png ‏36 KB

    The NI 9229 Data Rate Control.
    See attachments
    Attachments:
    FPGA Coercion VI.png ‏76 KB
    FPGA Coercion VI 2.png ‏129 KB

  • Wrong data type when writing XML file

    We are trying to write an XML file from ODI but we get the following error:
    ODI-1217: Fallo de la sesión CMT_PAQ_CREA_XML (15001) con código de retorno 8000.
    ODI-1226: Fallo en el paso WRITE_XML_SCHEMA después de 1 intento(s).
    ODI-1232: Fallo en la ejecución del procedimiento WRITE_XML_SCHEMA.
    ODI-1228: Fallo en la tarea WRITE_XML_SCHEMA (Procedimiento) en el destino XML conexión CMTInCaMo.
    Caused By: java.sql.SQLException: Could not save the file D:\ODI\oracledi\XMLFiles\Cuentas11g.xml because a class java.sql.SQLException occurred and said: java.sql.SQLException: java.sql.SQLException: Wrong data type: type: <b>NUMERIC (2) expected: INTEGER value: 301000000232</b>
         at com.sunopsis.jdbc.driver.xml.SnpsXmlFile.writeToFile(SnpsXmlFile.java:740)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlConnection.internalExecute(SnpsXmlConnection.java:713)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatement.executeUpdate(SnpsXmlPreparedStatement.java:111)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:619)
    The datastores have valid records but when we try to write them in the XML file it didn't work.
    ¿Can somebody help us?

    Thanks, let me give you an update:
    The datatype of the element is defined as follows:
              <xs:element name="AcctNo" minOccurs="1" maxOccurs="1">
                   <xs:simpleType>
                        <xs:restriction base="xs:string">
                             <xs:maxLength value="60"></xs:maxLength>
                        </xs:restriction>
                   </xs:simpleType>
              </xs:element>
    The ODI reverse ingeneering has created the column as VARCHAR(255). I think this ok, because XML driver doesn't takes in account the xsd element defined length.
    We have checked the XSD and is valid.
    In the other hand, I must say that we have created an interface that is loading data into the corresponding datastore without any problem but we couldn't generate an XML file from it.
    Any other advice?

  • FPGA Up Cast Funktion deletes Values form Read/Write Controll

    Hello Everybody,
    I Have an other Problem with my RT-FPGA cRIO...
    I have now managed to read the module IDs to convert this combination in a certain casenumber and this one then selects the FPGA File. Now is that I have inbounded various FPGA Bitfiles. If I composed them by the the "Up Cast function" to a universal reference then there will disappear some elements by using the Read / Write Control .
    I have a picture attached that this Clarifies!
    The first two R / W Controller have been up before the cast and the third upcast diverted after.
    I hope you can help me!
    thank you in advance before
    MaJahn

    Even now I've noticed the function Invoce methode: Read TEDS is also no longer supported.
    Why?!
    The both VIs are exactly the same during the Modules in it are different.
    Iam using LabVIEW 2009 and the newest Drivers from the NI site!

  • Imaqio (fpga) PCIe 8255R read/write control ISO input

    Hi. I have an external trigger connected to ISO INPUT 5 on my PCIe 8255R which has an fpga RIO (see manual). I  want to read the value of ISO INPUT 5  using Read/Write control vi on Labview but this vi doesn't show that input (it shows iso inputs from 6 to 11). I'm using the default IMAQIO bitfile that comes in the installation directory to open the FPGA. What should I do?. Thanks in advance.

    Hi Akiel,
    Thanks for your question, I'm guessing the reasoning behind this is that you have a large number of indicators?
    Whilst there isn't an in-built way of dynamically referencing which indicator on the FPGA to read from, there is a custom FPGA interface tool which may be of some use to you:
    https://decibel.ni.com/content/docs/DOC-17185
    If you read through this, let me know if this helps or if you need any help understanding what this is doing.
    Regards,
    Ben Clark

  • Problems with Custom Data Types when converting from TS 1.0 to 3.0.

    I am currently involved in the process of converting a test environment from TestStand 1.0, LabVIEW 5.1, and Windows NT to TestStand 3.0, LabVIEW 7.0, and Windows XP. We use a custom Operator Interface developed in LV. Based on the entered Model and Serial number, the appropriate Test Sequence is called. We also use a custom Process Model. The steps in the Test Sequence are either LV code modules or DLLs created in C++. We have LV SubVIs and C++ API functions that allow the developers of the test steps to add data to various Custom Data Types. For example, a developer may set up a test to add a note (Step.Result.Notes[x].String) when the test fails. Step.Result.Notes is a container for an array of strings. The attempt to set a note first attempts to use SetDimensions to redimension the array, then SetValString to set the value. These notes are added to the report. On the old system, everything worked fine. A note could be added to any result. On the new system, if a note is added to say the 5th result, but results 1-4 do not have a note, the test sequence ends and the Operator Interface returns to waiting for data entry (as if no test ever happened). No report is generated. The LabVIEW libraries have been modified to solve this problem by calling SetDimensions to incrementally increase the array size by one, and populating the unused TestStand array elements with an empty array of LabVIEW strings using the SetValString call . In other words, based on the previous example, if the user wants to set a note for the 5th result, the notes for results 1-4 must first be sent an empty array of strings. The report will only display the note for Result 5 (as desired). In addition to this being cumbersome, attempting to implement the same workaround in the C++ API has been unsuccessful because even though the note arrays for unwanted notes (1-4) is initialized with nothing, it is still displayed as a note (empty) on the report. If anybody knows what is wrong and what the solution is, it will be appreciated.

    Aaron,
    Thanks for your reply. I will attempt to clarify. I am working with a single step. The step calls a DLL. The DLL performs many 'checks' on the UUT (e.g. Model Number Check, Serial Number Check, Calibration Constants Check, etc.). Under the Type Palette - MyTypes.ini, we have a Step Type called TEST_DLL with a container in it called Results. In the Results container are a number of things, but I will only list the important ones:
    Notes (Array of Type 'Notes'; Type 'Notes' is a Custom Data Type (container, Type Definition)containing an array of strings called 'String')
    -Notes are generally set when on of the checks fails, otherwise no Note is set for the check.
    Val (Array of Type 'Val'; Type 'Val' is Custom Data Type (container, Type Definition) containing a Boolean called 'Boolean')
    -Val indicates whether the check passed of failed
    Pseudocode example:
    //Model Number Check
    check# = 0;
    resultBOOL = ModelNumberCheck();
    SetDimensions("Step.Result.Val", 0, "[0]", check#);
    SetValBoolean("Step.Result.Val[check#].Boolean", 0, resultBOOL);
    if(resultBOOL == FAIL)
    Note# = 0;
    SetDimensions("Step.Result.Notes", 0, "[0]", check#);
    SetDimensions(Step.Result.Notes[check#].String, 0, "[0]", Note#);
    SetValString("Step.Result.Notes[check#].String[Note#]", 0, "Model Number Check failed");
    Note# = 1;
    SetDimensions(Step.Result.Notes[check#].String, 0, "[0]", Note#);
    SetValString("Step.Result.Notes[check#].String[Note#]", 0, "Model Number = 1234");
    //Serial Number Check
    check# = 1;
    resultBOOL = SerialNumberCheck();
    SetDimensions("Step.Result.Val", 0, "[0]", check#);
    SetValBoolean("Step.Result.Val[check#].Boolean", 0, resultBOOL);
    if(resultBOOL == FAIL)
    Note# = 0;
    SetDimensions("Step.Result.Notes", 0, "[0]", check#);
    SetDimensions(Step.Result.Notes[check#].String, 0, "[0]", Note#);
    SetValString("Step.Result.Notes[check#].String[Note#]", 0, "Serial Number does not match expected");
    More Checks
    As you can see above, the "Step.Result.Val" array is redimensioned for every check. The "Step.Result.Notes" array is only redimensioned when a note needs to be added for a failing check. If the entire step executes and no check adds a note, the sequence is fine. If every check fails and therefore every check adds a note, the sequence is fine. However, if there are any gaps (e.g. check 0 adds a note, check 1 does not add a note, and check 2 tries to add a note), the sequence will stop. If I add blank notes for every check that would otherwise not have a note, the sequence completes, but the report shows the blank note.
    Also, the exact code that is causing these problems runs fine on our old systems (TestStand 1.0). I hope that I clarified the problem and thanks again for the help.

  • How to reference complex data type when consuming web services in WAS 620?

    In WAS 620, I tried to consume a web service in ABAP. I was successful when the web service returned one or more simple data type. But when the web service is changed to return a complex data type (eg. a structure with 3 elements), the call to the web service did not return anything.
    Do any of you know how to reference the individual element in the structure of an output parameter in a web service? I use the add_parameter method of the CSoapDocument class to identify the output parameters.
    Here is part of the WSDL file:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="urn:sap-com:document:sap:rfc:functions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="urn:sap-com:document:sap:rfc:functions">
    - <types>
    - <xsd:schema targetNamespace="urn:sap-com:document:sap:rfc:functions">
    - <xsd:element name="Z_SRM_SOAP_TEST_COMPLEX">
    - <xsd:complexType>
    - <xsd:all>
    - <xsd:element name="INTEXT">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
      </xsd:all>
      </xsd:complexType>
      </xsd:element>
    - <xsd:element name="Z_SRM_SOAP_TEST_COMPLEX.Response">
    - <xsd:complexType>
    - <xsd:all>
      <xsd:element name="OUTTEXT" type="s0:ZSRM_TEST_STRUCT" />
      </xsd:all>
      </xsd:complexType>
      </xsd:element>
    - <xsd:complexType name="ZSRM_TEST_STRUCT">
    - <xsd:sequence>
    - <xsd:element name="ELEMENT1" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    - <xsd:element name="ELEMENT2" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    - <xsd:element name="ELEMENT3" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="50" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>
      </types>

    Hi,
      [email protected] is my id and one more thing u by looking at the wsdl file u can know what al the parameters we have to give to the webservice so try it out also.
    Regards,
    Sirisha.

  • Place a string before a data type when creating a column in a new table

    Hi,
    I am trying to create a table in Oracle 10g called Penalty with the following Primary Key; PenaltyType. I wish to insert the word 'penalty' and a single number into each column without creating a sequence, for example penalty1, penalty2, penalty4, penalty9 etc with the number input by the user and the database automatically inserting the word before it.
    I am not sure about how I go about creating this as a constraint on the data type, could anyone possibly enlighten me?
    I am using code which forms part of a larger SQL script to create a car hire database as detailed below;
    CREATE TABLE Penalty
    (PenaltyType ???????????????
    CONSTRAINT pen_PenaltyType_pk PRIMARY KEY (PenaltyType),
    MinDay NUMBER(3),
    MaxDay NUMBER(3),
    Cost NUMBER(2, 2));
    Where the question marks would be replaced by the inserted word and single number to meet data type constraint:- "The word penalty followed by a single number (eg. Penalty1) "
    Any help would be most appreciated, hope it's not too confusing, and sorry about formatting but the forum left justifies it all.
    Thanks,
    Jason

    Something like this ?
    SQL> desc penalty
    Name                                                              Null?    Type
    PENALTYTYPE                                                       NOT NULL VARCHAR2(20)
    MINDAY                                                                     NUMBER(3)
    MAXDAY                                                                     NUMBER(3)
    COST                                                                       NUMBER(2,2)
    SQL> create or replace trigger trig_penalty
      2  before insert on penalty
      3  for each row
      4  begin
      5     :new.penaltytype := 'Penalty' || trim(to_char(to_number(:new.penaltytype),'000000'));
      6  exception
      7     when others then
      8       raise_application_error(-20001,'Wrong value');
      9* end;
    SQL> /
    Trigger created.
    SQL> insert into penalty(penaltytype) values(1);
    1 row created.
    SQL> select * from penalty;
    PENALTYTYPE                   MINDAY          MAXDAY            COST
    Penalty000001
    SQL> insert into penalty(penaltytype) values('A');
    insert into penalty(penaltytype) values('A')
    ERROR at line 1:
    ORA-20001: Wrong value
    ORA-06512: at "TEST.TRIG_PENALTY", line 5
    ORA-04088: error during execution of trigger 'TEST.TRIG_PENALTY'
    SQL>BTW, you can use tags, [pre] before text, and [[i]pre] after text, to format it.

  • What's the data type when defining a KF to show an integer with a sign?

    We want show some days difference which should be an integer with either a positive or negative sign.  I used to design a KF with type of Number with "DEC - Counter or amount field with comma and sign" as the Data Type, but find it shows 25.000 if the day difference is 25 days.  We want to show it as 25 other than 25.000.  Then what type would we pick when defining the KF?  Use Integer as the type?  But we also want it to show the sign symbol.
    The type field is dimmed as long as the InfoObj. is activated that I have to remove this field.  I've delete all the data loaded in ODS, PSA and etc., and I have successfully remove this KF from InfoSource, but when I try to remove it from the ODS, always get the msg "Can't move/delete locked InfoObjects" even if the InfoObject is not locked (I've tried SM12 to delete all locked entries and also tried relog on, but not helpful).  If someone gives any idea, I would be very appreciated on how to remove this KF from ODS and also let me what type should I use when creating a new KF which only shows integer with a sign!
    Thanks

    hey Siggi,
    Now after I right click the ODS and select "Delete Data", the KF eventually gets removed from the ODS without any error, then I continue to delete this InfoObj. 
    However, when I run the InfoPackage to load data to the ODS, get a msg (see below in between two dashed lines):
    Syntax error in GP_ERR_RSDRO_UPDATE, row 1,210 (-> long text)
    Message no. RG102
    Diagnosis
    The data object "I_S_OLDDATA" does not have a component called "/BIC/Z_field".
    Where Z_field is the InfoObject we deleted.  With this error, that's even worse since that stops any data coming in!  How to get rid of this error that we can continue to load data?
    Thanks

  • Incorrect data value when insert into oracle table

    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.

    user11432758 wrote:
    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.
    implicit datatype conversion to NUMBER can result in leading zero to be eliminated.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Time Data Type when Exporting to Excel

    Hello,
    I have a report I wrote using crystal reports XI. There is a datetime field which I converted to a time field through the use of a formula and the time function.  When I right click on the field and view the data type it says time.
    However, when I export to excel the field comes up as a custom field.  How do I get it so that the exported field will appear as a time field in excel?
    Thank you for your help.

    >
    Vitaly Izmaylov wrote:
    > As far as I know, Crystal Reports does not export field type - only data.
    >
    > MS Excel defines the type by reviewing first top records and there is a knowledge base article on Microsoft website on this subject.
    >
    > Could you please give us an example how your time fields look like in Crystal Reports?
    The time looks like this:
    21:38
    10:53
    00:14
    Thanks,
    Athalia

  • Getting Incorrect data type error while trying to do a CAST in table

    Getting an error while trying to compile the following piece of code
    CREATE OR REPLACE PACKAGE BODY A_pkg AS
    FUNCTION A(O_error_message IN OUT varchar2)
    RETURN BOOLEAN IS
    --Declaring the local variables and CURSORs used in the program unit
    L_attrib_tbl CFA_SQL.TYP_attrib_tbl;
    cursor c1 is
    select list_first1.number_11
    from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
    BEGIN
    L_group_id = '22'
    IF L_merch_type_value = 'G' OR L_merch_type_value = 'I' THEN
    CFA_SQL.QUERY_ATTRIB(L_attrib_tbl,
    L_group_id) ;
    END IF;
    open C1;
    Fetch C1 into L_number;
    close C1;
    return true;
    END A;
    END;
    Also pasting the Spec for CFA_SQL which contains TYP_attrib_tbl
    TYPE TYP_attrib_rec IS RECORD
    group_id CFA_ATTRIB_GROUP.GROUP_ID%TYPE,
    varchar2_1 VARCHAR2,
    number_11 number(10,0));
    TYPE TYP_attrib_tbl is TABLE of TYP_attrib_rec INDEX BY BINARY_INTEGER;
    The error is coming in the line
    cursor c1 is
    select list_first1.number_11
    from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
    with the error as Invalid data type pointing to CFA_SQL.TYP_attrib_tbl as invalid, but I have initialized L_attrib_tbl as of that datatype only. Ahy help would be greatly appreciated.
    Regards,
    Joydeep

    Hi Kelly,
    There is no data that is entered in that period.The data will be entered for that period next month.
    POV is also not set to that period,but still the problem persists.
    Thanks

  • Space removed from character data type when move to internal table issue...

    Hi Friends,
                        I converted material code and other details into internal table which have corresponding data types.But in internal table,I can see material code as left justified ,but after that space was removed.For example if material code is 'ABC' then rest of the space(material char(18)) are removed.But I need remaining spaces.I tried to concatenate material  code with spaces (caoncatenate matnr `        ` int etc .. )at right side and moved to another internal table.Its working.But the problem is material codes have different values like one material 'ABC' and another like '123893-h' etc.So I need to calculate the space(out of char 18) dynamiclly and need to put space based on material code value.
    << Moderator message - Everyone's problem is important >>
    .Thank you all..
    Regards,
    Kumaran..
    Edited by: Rob Burbank on Oct 26, 2010 11:18 AM

    Hi Ramkumaran,
    You have not told the purpose of having these spaces.
    is it for transfering to a file?
    If that is the case, use a table with fixed lenght lines instead of many fields.
    i.e. try something like this
    DATA : i_tab type standard table of BUSDATA,
    wa_tab type BUSDATA.
    wa_tab+0(10) = material number.
    wa_tab+10(10) = material code.
    wa_tab+20(4) = company code...
    append wa_tab to i_tab.
    Thanks
    Vimal

Maybe you are looking for

  • Best setting for gif animations

    what is the optimal setting for animated gifs

  • Help with purchasing cables for Sony DCR-TRV320

    I have the above model sony camcorder and the sony website has 3 different cables that supposedly work to transfer video to a computer.... the VMC-IL4435, the VMC-IL4415 and the VMC-IL4615. Does it make a difference which one I should purchase? Thank

  • Problem setting up model WRT54G

    I am having difficulty in setting up my Wireless -G Broadband router model #WRT54G.  I Have Comcast High-Speed Cable Internet.  My internet connection times out after a few minutes and my connection is lost after a successful configuration of the rou

  • Bringing Yahoo! map markers to the front

    I have a yahoo map that is loading multiple instances of "marker2.swf" onto a map, based upon their addresses.  Each marker, when rolled over, pops up a window displaying information about the location. The problem I have is that the markers get plac

  • Recovering files from your ipod

    My computer got reconfigured, so is there a way ro recover files from your ipod to your computer? I have a windows XP not a mac,if that makes a difference.