Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the value of GETTHISVAL
Message
 
 
To
03/02/2004 17:01:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00873652
Message ID:
00873670
Views:
19
SELECT t1.*, t3.GetThisVal 
  FROM test1 t1 ;
  JOIN test3 t3 ON t3.cprod = t1.cprod
>Hi all,
>Considering these test tables, can I get all the columns of TEST1 and TEST3.GetThisVal column using a single select-sql? Also, the query must be using the JOIN clause as opposed to the WHERE clause.
>
>close databases all
>set safety off
>set confirm off
>create table test1 (nwhse i, cprod c(1))
>insert into test1 values (1,'A')
>insert into test1 values (1,'C')
>insert into test1 values (2,'B')
>insert into test1 values (2,'C')
>insert into test1 values (3,'B')
>insert into test1 values (3,'A')
>insert into test1 values (3,'D')
>
>create table test2 (nwhse i, cwhse c(2))
>insert into test2 values (1,'W1')
>insert into test2 values (2,'W2')
>insert into test2 values (3,'W3')
>
>create table test3 (cwhse c(2), cprod c(1), getthisval i)
>insert into test3 values ('W1','A',1)
>insert into test3 values ('W1','B',2)
>insert into test3 values ('W1','C',3)
>insert into test3 values ('W2','A',11)
>insert into test3 values ('W2','B',22)
>insert into test3 values ('W3','A',111)
>insert into test3 values ('W3','D',222)
>
>TIA
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform