IS left join the right way?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: IS left join the right way?

  1. #1
    Join Date
    Mar 2005
    Posts
    110

    IS left join the right way?

    Hello everyone,

    I have two tables.
    Table1 has around 20000 rows. Table2 has 2500 rows.

    fields in Table1:
    sdq03
    lin03
    ....

    fields in table2
    sb_code
    ship_id
    .....

    I want to create a new table(lin03,shipid) based on the two table join together.
    shipId in new table is if sdq3=sb_code and ship_id<>"" then shipId=table2.ship_id. else shipid=sdq03.

    can I implement it with "select...into ". how to write SQl statement.

    thanks in advance!

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    What kind of database?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Mar 2005
    Posts
    110
    FoxPro

    thanks

Similar Threads

  1. Add table to view
    By franklch in forum Database
    Replies: 3
    Last Post: 05-19-2005, 04:39 PM
  2. Help with a Join and Duplicates?
    By maxpenguin in forum Database
    Replies: 2
    Last Post: 04-13-2005, 06:01 AM
  3. Problem with stored procedure
    By yip in forum Database
    Replies: 1
    Last Post: 09-24-2002, 12:31 AM
  4. Long, basic Java Question.
    By Tom in forum Java
    Replies: 0
    Last Post: 03-18-2002, 10:25 AM
  5. Subquery in a Left Join?
    By John Pierson in forum Database
    Replies: 9
    Last Post: 01-18-2001, 01:10 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