Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    10

    Unanswered: prob in retrieving

    i have two tables named sec_mast and sec_detail

    SQL> descr sec_mast;
    Name Null? Type
    ----------------------------------------- -------- ------------
    SEC_NO NOT NULL NUMBER(4)
    CATG_CODE NUMBER(2)
    FACE_VAL NOT NULL NUMBER(10,2)
    PUR_VAL NOT NULL NUMBER(10,2)
    INT_PAID NOT NULL NUMBER(8,2)
    INT_RECD NOT NULL NUMBER(8,2)
    BRKR NOT NULL NUMBER(8,2)
    TOT_VAL NOT NULL NUMBER(12,2)
    VOU_NO VARCHAR2(9)
    VOU_DATE DATE
    VOU_AMT NUMBER(15,2)
    DUE_DATE1 NOT NULL DATE
    DUE_DATE2 DATE
    LF_NO NOT NULL VARCHAR2(10)
    MAT_DATE NOT NULL DATE
    FK_VOU_NO2 VARCHAR2(9)

    SQL> descr sec_detail;
    Name Null? Type
    ----------------------------------------- -------- ----------------
    SEC_NO NUMBER(4)
    LF_NO VARCHAR2(8)
    DUE_DATE1 DATE
    VOU_NO VARCHAR2(9)
    VOU_DATE DATE
    VOU_AMT NUMBER(15,2)
    FK_VOU_NO1 VARCHAR2(9)


    my problem is that i want to retrieve values from database and i have used following query for the prepared statement.Here VOU_No is foreign key.

    select * from sec_detail,sec_mast where sec_detail.sec_no=sec_mast.sec_no //

    if this query is wrong then plzz help me in this..


    i have done this in jsp page

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    1) is this a mysql question? If not there are other specific database forums
    2) the select statement is fine. Does it give you different results than you want?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •