Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on Select SQL statement
Message
From
19/10/2006 06:23:19
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Question on Select SQL statement
Miscellaneous
Thread ID:
01163229
Message ID:
01163229
Views:
46
Dear All,

I got a inventory list like
iv_master_id
qty
location
nstatus
I select the record for different locations by this
FOR x = 1 to RECCOUNT("tb_location")
  tb_name = "stock"+trans(x)
  select iv_master_id,SUM(qty) as total_qty,MIN(location) as location from iv_stocklist into   cursor &tb_name where location = ?clocation and nstatus = 0 group by 1 order by 1
endfor
I try to join different tables together by this
SELECT a.iv_master_id,b.iv_master_id,detail,a.total_qty as &Qty1, b.total_qty as &Qty2 FROM stock1 a full JOIN stock2 b ON a.iv_master_id = b.iv_master_id 
But there are 2 columns of iv_master_id, instead of one, which I want...?! What should I do?
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform