Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of "INTO" clause in a "SELECT" SQL Statement?

Status
Not open for further replies.

tigreeuropeo

IS-IT--Management
Oct 2, 2001
30
ES
Hi!!!

I have a very simple table of products, identified by a reference number:

Reference Text
Description Text

I need to retrieve the description of one product, but I don't know how to use the INTO clause in a SELECT statement.
In many other programming languages the use would be:

SELECT Description INTO <host variable>
FROM Products
WHERE Reference = &quot;123456&quot;

The host variable (without the brackets) should be a string of our code in Access. Is it possible to do that?.
Thanks.
 
The INTO clause is used to make a new table. Try this...
SELECT <host variable>=Description
FROM Products
WHERE Reference = &quot;123456&quot;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top