Storing data in a 2d matrix

i have to store data of the bus routes between two bus stops
i need to save it as a matrix
how to design a table or tables for it?
stop1 stop2 stop3
stop1 -1 a b
stop2 a -1 c
stop3 b c -1

shashank2 wrote:
i have to store data of the bus routes between two bus stops
i need to save it as a matrix
how to design a table or tables for it?
stop1 stop2 stop3
stop1 -1 a b
stop2 a -1 c
stop3 b c -1Hi,
As Sentinel said, don't confuse how data appears with how data is stored.
The same data can appear in lots of different ways in different reports.
In a relational database, each kind of object, or entity, is usually stored in a separate table.
For example, it seems your data concerns two entities, bus routes and stops. So you should probably have a route table and a stop table.
The route table will contain attributes of the route (that is, things that define or describe the route, such as route number, date opened, total length, ...). Each route will have at (most one) of each attribute. (that is, there wlll only be one route_number column).
The stop table will contain attributes of the stops (stop name, coordinates, description of facilities, ...) Each stop will have (at most) one of each.
Now, how should we record the fact that route a stops at stop1?
'stop1' is not an attribute of the route, since route a also stops at stop2.
'a' is not an attribute of the stop, since route b also stops at stop1.
There is a many-to-many relationship between routes and stops: each route (presumably) goes to many stops, and each stop (might possibly) serve many routes.
Typically, a many-to-many relationship between two entities is stored in a separate table, with pointers (columns with the same value as some column in another table) to the separate entity tables.
For example:
CREATE TABLE     route_stop
(     route_id     VARCHAR2 (10)
,     stop_id          VARCHAR2 (10)
INSERT INTO route_stop (route_id, stop_id) VALUES ('a', 'stop1');
INSERT INTO route_stop (route_id, stop_id) VALUES ('a', 'stop2');
INSERT INTO route_stop (route_id, stop_id) VALUES ('b', 'stop1');
INSERT INTO route_stop (route_id, stop_id) VALUES ('b', 'stop3');
INSERT INTO route_stop (route_id, stop_id) VALUES ('c', 'stop2');
INSERT INTO route_stop (route_id, stop_id) VALUES ('c', 'stop3');I haven't shown the route, which contains a column with the values 'a', 'b', and 'c',
or the stop table, that contains the values 'stop1', stop2', 'stop3'.
In a good relational design, data is stored in one place only.
The fact that route a goes to stop1 only has to be recorded in one place, the route_stop table.
If the route changes in the future, and route a no longer goes to stop1, you will only have to change one row of one table.
As Sentinel said, you can display this data as a matrix if you need to:
WITH     all_pairs     AS
     SELECT     a.route_id
     ,     a.stop_id     AS from_id
     ,     b.stop_id     AS to_id
     FROM     route_stop     a
     JOIN     route_stop     b  ON     a.route_id =  b.route_id
                       AND     a.stop_id  != b.stop_id
SELECT     from_id
,     NVL     ( MAX (CASE WHEN to_id = 'stop1' THEN route_id END)
          , '-1'
          )               AS stop1
,     NVL     ( MAX (CASE WHEN to_id = 'stop2' THEN route_id END)
          , '-1'
          )               AS stop2
,     NVL     ( MAX (CASE WHEN to_id = 'stop3' THEN route_id END)
          , '-1'
          )               AS stop3
FROM     all_pairs
GROUP BY     from_id
ORDER BY     from_id;The query above produces the results below:
FROM_ID    STOP1      STOP2      STOP3
stop1      -1         a          b
stop2      a          -1         c
stop3      b          c          -1The sub-query all_pairs above is a lot like Sentinel's my_2d_routes table.
For purposes of this query, it's convenient to have rendundant data (for example, one row that says
route 'a' goes to 'stop1' and 'stop2', and another row that says
route 'a' goes to 'stop2' and 'stop1', but this does not need to be stored permanently in any table.
Note that '-1' is not stored in any table.
It is not an attribute of any route, stop, or route_stop. It's merely part of the display you want for this query.

Similar Messages

  • SAP paging overflow when storing data in the ABAP/4 memory.

    I am trying to create a data source in  BI7.0 in the Datawarehousing Workbench. But along the process when i need to select a view i get an error detailed in the following error file extract: Please go through and assist.
    untime Errors         MEMORY_NO_MORE_PAGING
    Date and Time          06.06.2009 14:21:35
    Short text
    SAP paging overflow when storing data in the ABAP/4 memory.
    What happened?
    The current program requested storage space from the SAP paging area,
    but this request could not be fulfilled.
    of this area in the SAP system profile.
    What can you do?
    Note which actions and input led to the error.
    For further help in handling the problem, contact your SAP administrator
    You can use the ABAP dump analysis transaction ST22 to view and manage
    termination messages, in particular for long term reference.
    Error analysis
    The ABAP/4 runtime system and the ABAP/4 compiler use a common
    interface to store different types of data in different parts of
    the SAP paging area. This data includes the
    ABAP/4 memory (EXPORT TO MEMORY), the SUBMIT REPORT parameters,
    CALL DIALOG and CALL TRANSACTION USING, as well as internally defined
    macros (specified with DEFINE).
    To store further data in the SAP paging area, you attempted to
    allocate a new SAP paging block, but no more blocks were
    available.
    When the SAP paging overflow occurred, the ABAP/4 memory contained
    entries for 20 of different IDs.
    Please note:
    To facilitate error handling, the ABAP/4 memory was
    deleted.
    How to correct the error
    The amount of storage space (in bytes) filled at termination time was:
    Roll area...................... 8176
    Extended memory (EM)........... 13587912
    Assigned memory (HEAP)......... 0
    Short area..................... " "
    Paging area.................... 40960
    Maximum address space.......... " "
    By calling Transaction SM04 and choosing 'Goto' -> 'Block list',
    you can display an overview of the current roll and paging memory
    levels resulting from active users and their transactions. Try to
    decide from this whether another program requires a lot of memory
    space (perhaps too much).
    The system log contains more detailed information about the
    termination. Check for any unwanted recursion.
    Determine whether the error also occurs with small volumes of
    data. Check the profile (parameter "rdisp/PG_MAXFS", see
    Installation Guidelines).
    Is the disk or the file system that contains the paging file
    full to the extent that it cannot be increased, although it has
    not yet reached the size defined in the profile? Is the
    operating system configured to accommodate files of such a
    size?
    The ABAP processor stores different types of data in the SAP
    paging area. These include:
    (1) Data clusters (EXPORT ... TO MEMORY ...)
    (2) Parameters for calling programs (SUBMIT REPORT ...),
    Dialog modules (CALL DIALOG ...) and transactions
    (CALL TRANSACTION USING ...)
    (3) Internally defined program macros (DEFINE ...)
    Accordingly, you should check the relevant statements in a program
    that results in an overflow of the SAP paging area.
    It is critical when many internal tables, possibly with
    different IDs, are written to memory (EXPORT).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "MEMORY_NO_MORE_PAGING" " "
    "SAPLWDTM" or "LWDTMU20"
    "TABC_ACTIVATE_AND_UPDATE"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.

    Hi Huggins,
    Maintenance of the Paging File is owned by your basis team.
    They should increase this in order for your transaction to process successfully.
    Just for your reference, in case the OS used is windows server 2003, paging file value can be checked through;
    Right click in the My Computer>properties.
    Then go to Advance tab;
    Then there should be a performance section, click the settings
    Then Advance tab again. The paging file can be seen from there.
    (and can be adjusted from there also)
    The value of the paging file in general will be dependent with the available RAM from the hardware.
    Hope this helps. Thanks a lot.
    - Jeff

  • Why files in Lightroom mobile and files in the creative cloud not the same? idea-  one place(stored date) for all application ??????

    Why files in Lightroom mobile and files in the creative cloud not the same? idea- one place(stored date) for all application ??????

    Lightroom Mobile is not a cloud storage service. You shouldn't treat it as a way of backing up your files. You are merely storing Smart Previews of your files in the cloud space, high-quality JPEGs of your files regardless of their original format on your desktop. The point is that they are there so you can continue editing them in a Lightroom-like environment even while away from your desktop/laptop computer. The files in Lightroom Mobile can only be used in Lightroom Mobile.
    This is very different from what is offered by the Creative Cloud storage, which can be used to synchronize your files between any device (that can support the individual files).
    The vast difference in how each service works and its intended use is why they are separate.

  • How to avoid Flickaring  When Adding data in Addon User Matrix

    Experts,
    I am  Adding Query Result in User Matrix  one by one. but there is lots of Flicker.
    how to Avoid this Flickering.
    Bomiitems = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                    If Bomtyp = "U" And BomNo = "0" Then
                                        BOMItem = "SELECT Distinct T0.[Code], T1.[ItemName] , ( 1 / Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0),('" & Quanti & "'/ Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0) as "
                                        BOMItem = BOMItem + " 'Quanti',T1.[Excisable],'N' as U_Rec , T1.[InvntryUom],T0.[Warehouse] 'Warehouse',T0.[IssueMthd]'IssMthd' FROM ITT1 T0  INNER JOIN OITM T1 "
                                        BOMItem = BOMItem + " ON T0.Code = T1.ItemCode  INNER JOIN OITT T2 ON T0.Father = T2.Code "
                                        BOMItem = BOMItem + " WHERE T0.[Father] ='" & Icode & "'"
                                        Bomiitems.DoQuery(BOMItem)
                                    ElseIf Bomtyp = "U" And BomNo <> "0" Then
                                        'BOMItem = "SELECT T0.[Code], T1.[ItemName] , ((T0.[Quantity]/ T2.[Qauntity])*'" & Quanti & "') as 'Quanti',T1.[Excisable],'N' as U_Rec FROM ITT1 T0  INNER JOIN OITM T1 ON T0.Code = T1.ItemCode  INNER JOIN OITT T2 ON T0.Father = T2.Code WHERE T0.[Father] ='" & Icode & "'"
                                        BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0) ,('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0)  as 'Quanti',T2.[Excisable], T0.[U_Rec],T2.[InvntryUom] ,T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
                                        BOMItem = BOMItem + "FROM [dbo].[@OITTA]  T0 inner join  [dbo].[@ITTA1]  "
                                        BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON  T1.[U_Icode] = T2.[ItemCode]"
                                        BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND   T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'U'  "
                                        Bomiitems.DoQuery(BOMItem)
                                    ElseIf Bomtyp = "P" Then
                                        BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0),('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty]  as Float) ,0)) * Isnull(Cast(T1.[U_Quanti]  As Float),0)  as 'Quanti',T2.[Excisable], T0.[U_Rec] ,T2.[InvntryUom],T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
                                        BOMItem = BOMItem + "FROM [dbo].[@OITTA]  T0 inner join  [dbo].[@ITTA1]  "
                                        BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON  T1.[U_Icode] = T2.[ItemCode]"
                                        BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND   T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'P' "
                                        Bomiitems.DoQuery(BOMItem)
                                    End If
                                        Bomiitems.DoQuery(BOMItem)
                                    If Bomiitems.RecordCount > 0 Then
                                        'RecCount1 = RecSet1.RecordCount
                                        Bomiitems.MoveFirst()
                                        i = 0
                                        'osubForm   .Freeze(True)
                                        oMatrix = oForm.Items.Item("1000001").Specific
                                        oMatrix.FlushToDataSource()
                                        While Not (Bomiitems.EoF)
                                            If i = 0 Then
                                                oMatrix.AddRow()
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", 0, i + 1)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", 0, Bomiitems.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", 0, Bomiitems.Fields.Item(1).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", 0, Bomiitems.Fields.Item(2).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", 0, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", 0, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", 0, Bomiitems.Fields.Item("Warehouse").Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", 0, Bomiitems.Fields.Item("IssMthd").Value)
                                                Dim orsWhsDetails As SAPbobsCOM.Recordset
                                                Dim strWhsDetails As String
                                                orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                                strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND   T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
                                                orsWhsDetails.DoQuery(strWhsDetails)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", 0, orsWhsDetails.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", 0, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", 0, orsWhsDetails.Fields.Item(3).Value)
                                                oMatrix.LoadFromDataSource()
                                            Else
                                                oMatrix.FlushToDataSource()
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").InsertRecord(i)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", i, i + 1)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", i, Bomiitems.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", i, Bomiitems.Fields.Item(1).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", i, Bomiitems.Fields.Item(2).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", i, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", i, Bomiitems.Fields.Item(3).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", i, Bomiitems.Fields.Item("Warehouse").Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", i, Bomiitems.Fields.Item("IssMthd").Value)
                                                Dim orsWhsDetails As SAPbobsCOM.Recordset
                                                Dim strWhsDetails As String
                                                orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                                strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND   T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
                                                orsWhsDetails.DoQuery(strWhsDetails)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", i, orsWhsDetails.Fields.Item(0).Value)
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", i, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
                                                oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", i, orsWhsDetails.Fields.Item(3).Value)
                                                oMatrix.LoadFromDataSource()
                                            End If
                                            i = i + 1
                                            Bomiitems.MoveNext()
                                            oMatrix.LoadFromDataSource()
                                        End While
                                        oMatrix.LoadFromDataSource()
                                    End If
    Regards,
    Pravin Baji

    follow steps
    1)     Execute query so we can get data set
    2)     Clear matrix and data source (omatrix.clear(), oDBS.Clear())
    3)     Open loop
    4)     Insert record to oDBS using oDBS.InsertRecords(oDBS.Offset)
    5)     Then set value using oDBS.Setvalue(u2026u2026
    6)     Move next record
    7)     Finally close the loop
    8)     Matrix load from record set using oMatrix.LoadfromData()
    it will be work

  • If i associate my apple id with another email will i lose my icloud data or i will still be able to access all my stored data with the new linked to my apple id email address?

    hi there
    if i associate my apple id with another email will i lose my icloud data or i will still be able to access all my stored data with the new linked to my apple id email address?
    i mean i am not signing up for a new account, just changing my old id primary email which is my apple id login into account.
    in other words, www.icloud.com will recognize that it is still me if i login on the site? will i be able to see there all my stored information?
    and if i change my password, does it automatically changes the @icloud.com password which should be the same as my apple id pass?
    thanks

    After opening the email it shoud of had you enter the Apple ID and password. Using certian web browser's can cause errors. You can adjust securty settings (big pain) or you use another browser. Using Firefox or Safari should do the trick.
    Let me know if using Firefox or Safari resolved it.

  • How can i get the time to appear on my stored data in notepad

    Hi all,
    I was wondering how can i get the time to appear on my stored data in notepad? I saw an example before but i forgotten which example was it.. Any ideas??
    holla
    Attachments:
    TextFile1.txt ‏3 KB

    Hi
    Im using Labview 8.2. Currently it just shows the data without the time. Im not sure what to do. It works perfectly though. I just want the time to appear on my notepad along with my data
    holla
    Attachments:
    Testing1.txt ‏1 KB
    Untitled 231_LV80.vi ‏23 KB

  • Write / store xml data in Xe and retrieve stored data using pl/sql

    Hi to all,
    i'm searching a tutorial on:
    A - how to write / store xml data in Xe and retrieve stored data using pl/sql
    I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
    I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
    1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
    Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
    Thanx

    Thank you very much Carl,
    However my fault is that i've not tried to create the table via sql plus.
    Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
    however with a ddl script like the following the table was created successfully.
    create table example1
    keyvalue varchar2(10) primary key,
    xmlcolumn xmltype
    Thank you very much for your link.
    Message was edited by:
    Marcello Nocito

  • The table for storing data for infocube and ODS

    Hi all:
        could you please tell me how to find the table for storing data for infocube and ODS?
    thank you very much!

    Hi Jingying Sony,
    To find tables for any infoprvider go to SE11.
    In database table field enter the following
    Cube -
    Has fact table and dimension table
    For customized cube - ie cube names not starting with ' 0 '
    Uncompressed Fact table - /BIC/F<infocubename>
    Compressed fact table - /BIC/E<infocubename>
    Dimension table - /BIC/D<infocubename>
    For standard cube - ie cube names  starting with ' 0 '
    Uncompressed Fact table - /BI0/F<infocubename>
    Compressed fact table - /BI0/E<infocubename>
    Dimension table - /BI0/D<infocubename>
    Click on display.
    For DSO,
    For standard DSO active table- /BI0/A<DSO name>00.
    You use 40 for new table.
    Click on display.
    For customized DSO use- /BIC/A<DSO name>00.
    An easier way is in the database table field, write the name of the cube/DSO preceeded and followed by ' * ' sign. Then press F4 . It shall give you the names of the available table for that info provider.
    Double click on the name and choose display.
    Hope this helps,
    Best regards,
    Sunmit.

  • Problem storing date in MS Access using JSP

    Hi all,
    Can anyone please help me storing date in MS Access using Java i am getting errors. I think it is probably because MS Access take "date/month". I am entering a string with date and month example
    1st October as "0110". I don't know how to enter a date in MS Access.
    Here is my code.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@page import="java.io.*"%>
    <%@page import="java.sql.*"%>
    <HTML>
    <HEAD>
    <TITLE>  </TITLE>
    </HEAD>
    <BODY>
    <%
       String emplno = request.getParameter("emplno");
       String date = request.getParameter("date");
       String proposal = request.getParameter("proposals");
       String network1 = request.getParameter("network");
       String suppassociates = request.getParameter("suppasso");
       String intmngt = request.getParameter("intmgt");
       String client[] = request.getParameterValues("client");
       String client1= request.getParameter("client1");
       String clientunit[] = request.getParameterValues("clientunit");
       String clientunit1=request.getParameter("clientunit1");
       int staffid = Integer.parseInt(emplno);
       double proposalunit=Double.parseDouble(proposal);
       double suppliersunit=Double.parseDouble(suppassociates);
       double networkunit=Double.parseDouble(network1);
       double internalmgtunit=Double.parseDouble(intmngt);
       Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
       Connection con = DriverManager.getConnection("jdbc:odbc:finalmp" );
       String activities= "INSERT INTO StaffActivities (StaffID,Date,ProposalUnit,NetworkingUnit,SuppliersAssociatesUnit,InternalMGTUnit) VALUES (?,?,?,?,?,?)";
       PreparedStatement pstmt = con.prepareStatement(activities);
       pstmt.setInt(1,staffid);
       pstmt.setString(2,date);
       pstmt.setDouble(3,proposalunit);
       pstmt.setDouble(4,suppliersunit);
       pstmt.setDouble(5,networkunit);
       pstmt.setDouble(6,internammgtunit);
       pstmt.executeUpdate();
       //String emplno="hello";
       //String entered_date="hello";
       //int access_date=0;
       //int user_date=0;
       if(pstmt!=null)
         pstmt.close();
       if(con!=null)
         con.close();
    %>  
    </BODY>
    </HTML>

    i hope this can help you
    public static String convertToISOFormat(Date dateTime) {
            // ISO Format: 'YYYY-MM-DD HH:MM:SS'
            String returnValue = fillLeft(String.valueOf(dateTime.getYear()+1900), 4,
                    '0')
                    + "-"
                    + fillLeft(String.valueOf(dateTime.getMonth()+1), 2, '0')
                    + "-"
                    + fillLeft(String.valueOf(dateTime.getDate()), 2, '0')
                    + " "
                    + fillLeft(String.valueOf(dateTime.getHours()), 2, '0')
                    + ":"
                    + fillLeft(String.valueOf(dateTime.getMinutes()), 2, '0')
                    + ":" + fillLeft(String.valueOf(dateTime.getSeconds()), 2, '0');
            return returnValue;
        }

  • All my stored data in Numbers are gone. What do I do?

    All my stored data in "Numbers" are gone. What do I do?

    every workbook is gone, data in one workbook is gone? Cant open a workbook, any workbook? Please be a little more specific as to the circumstances so we can try to help out.
    Thanks
    Jason

  • Having problem with storing data in array

    Hi,
    I'm having problem on storing data in array. My problem is that each time it loops, the array just keep overwrite instead save to the next index. Like at 0 the value is 123, and 1 is 234. But i having that all data capture all overwrite at 0 till the last data it still show at 0. How do i correct this problem?
    Solved!
    Go to Solution.

    How to use array to do comparison? Like Array 1 go thru array 2 to get data Loss out and build an array. Like Array 1 ,1000,1024,1048,etc before 1520 fall in between Array 2 range 1000-1500. So Freq 1000,1024,1048 etc will get Loss value as 1 and 1520 fall in between 1500-2000 will output Loss 2. and so on till the end of the list. How should do this? Need help on this.
    Array 1                                                Array 2
    Freq                                              ​     Freq   Loss
    1000                                              ​    1000      1
    1024                                              ​    1500      2
    1048                                              ​    2000      3
    1100                                              ​     :
    1200                                              ​     :
    :                                                 ​        18000
    1520
    18000

  • Why view have no stored data ?  And what is the reason view take more time

    Why view have no stored data ? And what is the reason view take more time to query ?
    what happen if a view have stored data?

    user12941450 wrote:
    I want to know the reason that why querying view is slower then querying a normal table?..Untrue.
    For example take a table with 2laks record and a view for that table.
    If i make a query like( Select name,address from table) then it works fast then select(name,address)from view..Incorrectly interpreting the results.
    A view is a SQL statement. Only difference is that the SQL statement is stored in the database's dictionary. Let's consider the following view:
    create or replace view foo_view as select * from empWhen you use the view as follows:
    select * from foo_viewOracle sees it as follows:
    select * from (select * from emp)This is no slower, or no faster, than providing the following SQL to Oracle:
    select * from empSo if you observe a difference in performance between using plain SQL versus using that same SQL via a view, there are other reasons for that difference in performance. The reason is NOT that views are slower.

  • How to reduce size of stored data?

    Does anyone know of a way to reduce the size of the stored data? The IMAP-[…]@imap.gmail.com folder in my ~/Library/Mail directory is more than twice the size of what's used on my gmail account, is it supposed to be like that?

    Do you have a lot of attachments on the messages in the mailboxes of this account? One thing that balloons storage needs is that attachments may be redundantly stored in the mailboxes. If, for example, you open Home/Library/Mail/the IMAP account folder/INBOX.imapmbox you will note that it contains two folders -- Attachments and Messages. The attachments are replicated in the Attachments folder despite also being archived with the message in the Messages folder -- this may only be true if you have selected to Keep copies of all messages and their attachments for Offline viewing, however.
    Ernie

  • Why is there always "0 bytes" in Cache in Control Panel? It never increases, yet the stored data size continues to increase.

    This is annoying. I just updated to version 19 almost a week ago and still Firefox never seeks to keep anything in "Cache". After using firefox for a few days, it crashed a couple times already and now the browser randomly freezes (to the point to where my screen on/off button wont even respond). After maybe a few seconds...things will start moving, but sluggish to where I have to shut down FF in my task manager. There us "0" bytes cache shown, but stored data is at 70MB. I went into firefox and cleared cache via the settings but that did nothing. There is still 70MB of stored data and of course it alwats shows 0 bytes cache. What's up with that? Am I going to have to "Clear Data" just to fix this and lose my bookmarks and logins tet again?

    I think it's possible that Firefox, while emptying some database files, is not compacting them, so they continue to consume the same amount of "disk" space as they did before. On desktop versions of Firefox, you can use extensions such as the following for that purpose, but I don't know whether any such thing is available for mobile. Also, it would be nice to have it built in.
    * https://addons.mozilla.org/en-us/firefox/addon/places-maintenance/
    * https://addons.mozilla.org/en-us/firefox/addon/placescleaner/
    Unfortunately, in a quick search, I do not see a general purpose Android SQLite app that will runs on Firefox profile databases without root access (unless they are on the SD card, which seems highly doubtful).

  • Storing data in structured storage

    I see everywhere that storing data in stuctured storage way is the better thing to do if we want to make fast search.
    But how can I do it.
    I only see that the default storage is clob for xmltype and we also can say "stored as clob" but how do it for store it in structured storage.
    Thank you.

    You need to register an XML Schema that defines your data. You then define the type of data your XML columns will contain using XMLSCHEMA and ELEMENT clauses..
    See the XML DB demo for more info

Maybe you are looking for

  • HT201272 how to turn on my ipod

    how to restart or reset my ipod

  • Content in box

    How important is the content that comes with the final cut studio 2 box? I am only planning to use final cut pro, and DVD studio pro. Will content be lacking in those applications?

  • Snood not compatible with MLion-??!!

    Disaster! My Snood that worked in Leopard will not work in my newly installed Mountain Lion. Did I lose my score of 82? Any updates for Snood? I hope this will not be a problem with other installed applications like Quark 9, Photo shop CS5, Illustrat

  • Black thumbnail pictures.

    In iPhoto 7.1.5, the thumbnail pictures are black, but when opened individually, they are fine. How can I get them to show up in the thumbnails? Thanks!

  • My Disk Drive won't read my DVD or CD's

    Basically, my Macbook Pro won't "suck in" any disks.. It won't recognise them or anything.. Help?