Click here to Skip to main content
16,006,355 members
Home / Discussions / Database
   

Database

 
GeneralRe: ADO and ODBC - confused Pin
Pete O'Hanlon18-Jul-07 3:15
mvePete O'Hanlon18-Jul-07 3:15 
QuestionKnowing Table structure in Sybase Pin
meeram39517-Jul-07 3:33
meeram39517-Jul-07 3:33 
AnswerRe: Knowing Table structure in Sybase Pin
andyharman17-Jul-07 4:12
professionalandyharman17-Jul-07 4:12 
AnswerRe: Knowing Table structure in Sybase Pin
PIEBALDconsult17-Jul-07 7:54
mvePIEBALDconsult17-Jul-07 7:54 
Questionnewbie: How can I see the warnings when creating DB from file? Pin
Atara17-Jul-07 1:57
Atara17-Jul-07 1:57 
AnswerRe: newbie: How can I see the warnings when creating DB from file? Pin
Atara17-Jul-07 21:02
Atara17-Jul-07 21:02 
QuestionORA-12705: Cannot access NLS data files or invalid environment specified Pin
qtuan16-Jul-07 22:25
qtuan16-Jul-07 22:25 
QuestionProblem in Query Pin
Khan.Bangash16-Jul-07 21:42
Khan.Bangash16-Jul-07 21:42 
I have these three Tables,
customers, cust_order, cust_debit
customers primary ID is added to cust_order and cust_order primary key is added to cust_debit.
I want records from customers and cust_order table on a condition which is associated to cust_debit. Tables Structure is as follow
cutomers cust_order cust_debit
cust_id fname, lname, ...... order_id, cust_id, order_date ID, order_id, amount

I need fname, lname, order_id, order_date from customers and cust_order where cust_debit.amount >=2000,

Now I need only one record of a particular customers.I used the following query

SELECT cust_order.order_id as order_id, customers.fname as fname , customers.lname as lname, cust_order.order_date as order_date,cust_order.order_status as order_status from cust_order,customers, cust_debit where customers.customer_id=cust_order.customer_id and cust_order.order_id = cust_debit.order_id and cust_debit.amount >=200

It works fine, But I need only one record of a customers, like when we use DISTINCT.
How can I use that.
Pls Help me
Thanks in Advance.


AnswerRe: Problem in Query Pin
andyharman16-Jul-07 22:17
professionalandyharman16-Jul-07 22:17 
GeneralRe: Problem in Query Pin
Khan.Bangash16-Jul-07 22:30
Khan.Bangash16-Jul-07 22:30 
AnswerRe: Problem in Query Pin
andyharman17-Jul-07 1:23
professionalandyharman17-Jul-07 1:23 
GeneralRe: Problem in Query Pin
Khan.Bangash17-Jul-07 1:55
Khan.Bangash17-Jul-07 1:55 
AnswerRe: Problem in Query Pin
andyharman17-Jul-07 3:18
professionalandyharman17-Jul-07 3:18 
QuestionRights needed to create tablespace in oracle? Pin
Mushtaque Nizamani16-Jul-07 20:25
Mushtaque Nizamani16-Jul-07 20:25 
AnswerRe: Rights needed to create tablespace in oracle? [modified] Pin
andyharman16-Jul-07 20:31
professionalandyharman16-Jul-07 20:31 
QuestionDoubt in query........., Pin
Member 387988116-Jul-07 19:12
Member 387988116-Jul-07 19:12 
AnswerRe: Doubt in query........., [modified] Pin
andyharman16-Jul-07 20:24
professionalandyharman16-Jul-07 20:24 
GeneralRe: Doubt in query........., Pin
Member 387988116-Jul-07 20:36
Member 387988116-Jul-07 20:36 
GeneralRe: Doubt in query........., Pin
andyharman16-Jul-07 21:17
professionalandyharman16-Jul-07 21:17 
GeneralRe: Doubt in query........., Pin
RepliCrux16-Jul-07 20:37
RepliCrux16-Jul-07 20:37 
GeneralRe: Doubt in query........., Pin
RepliCrux16-Jul-07 20:53
RepliCrux16-Jul-07 20:53 
GeneralRe: Doubt in query........., Pin
Member 387988116-Jul-07 21:01
Member 387988116-Jul-07 21:01 
GeneralRe: Doubt in query........., Pin
ChandraRam17-Jul-07 4:01
ChandraRam17-Jul-07 4:01 
GeneralRe: Doubt in query........., Pin
ChandraRam17-Jul-07 4:11
ChandraRam17-Jul-07 4:11 
AnswerRe: Doubt in query........., Pin
N a v a n e e t h16-Jul-07 20:37
N a v a n e e t h16-Jul-07 20:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.