Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
| Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 24th, 2004, 02:58 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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..





  #2 (permalink)  
Old December 24th, 2004, 08:47 AM
Authorized User
 
Join Date: Apr 2004
Location: Boise, ID, USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You seem to have written a syntactically valid SQL statement. Since you haven't explained the results you want and whether that differs from the results you are getting, though, it is impossible for us to tell you whether this is the functionally correct SQL statement. If you can explain the requirement-- the question your statement is trying to answer-- we may be able to be more helpful.

Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC


Similar Threads
Thread Thread Starter Forum Replies Last Post
Favico Prob arunmohanmp HTML Code Clinic 4 April 9th, 2006 12:47 AM
prob in retrieving abhit_kumar MySQL 1 December 24th, 2004 09:03 AM
updation prob.......... abhit_kumar JSP Basics 0 December 14th, 2004 08:07 AM
0 entry prob dreamdragon Classic ASP Basics 3 December 12th, 2004 05:42 PM
prob........ abhit_kumar Java Databases 3 December 4th, 2004 03:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.