need help with the querry


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: need help with the querry

  1. #1
    Join Date
    Jun 2007
    Posts
    1

    need help with the querry

    These are the table...
    create table customer
    (
    c_id int,
    c_name varchar(20),
    city varchar(20),
    primary key(c_id)
    );

    create table order_d
    (
    o_id int,
    o_date datetime,
    c_id int
    foreign key references customer(c_id),
    o_amt int,
    primary key(o_id)
    );

    create table items
    (
    item int,
    price int,
    primary key(item)
    );

    create table order_i
    (
    o_id int
    foreign key references order_d(o_id),
    item int
    foreign key references items(item),
    qty int,
    primary key (o_id,item)
    );

    create table warehouse
    (
    w_id int,
    city varchar(20),
    primary key (w_id)
    );

    create table shipment
    (
    o_id int
    foreign key references order_d(o_id),
    w_id int
    foreign key references warehouse(w_id),
    ship_date datetime,
    primary key(w_id,o_id),
    );

    the querry is list all o_id for orders that were shipped from all the warehouses that the company has in specific city.
    Last edited by stone_cold_316; 06-17-2007 at 07:38 AM.

Similar Threads

  1. SQL Querry using ADO
    By Rob Lee in forum VB Classic
    Replies: 2
    Last Post: 01-18-2002, 08:55 AM
  2. Access Querry Problem
    By Larry Muller in forum Database
    Replies: 1
    Last Post: 01-13-2002, 10:02 AM
  3. Doubt in Querry
    By ArunKumar in forum VB Classic
    Replies: 1
    Last Post: 12-31-2001, 01:14 AM
  4. where clause for web page querry
    By daryl fixings in forum Database
    Replies: 2
    Last Post: 03-13-2001, 01:58 PM
  5. where I can get my On-line Oracle querry ?
    By Rajesh in forum Database
    Replies: 0
    Last Post: 01-17-2001, 11:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center