|
-
March 10th, 2010, 06:22 AM
#1
sql server ce query question
hi,
i have two tables
products that have the name and code and stock_products that have the
current stock
and i want in a single query see the especific value of the table stock_products
for example
from table one: code of product and from table two the stock of the
product
in secund table i have many records that belong for the same product
but i want only the last record
now the great question
how can i do that?
thanks a lot for your help 
i using sql server ce
-
March 18th, 2010, 11:25 AM
#2
Re: sql server ce query question
I've never worked with CE so I don't know if this will work. If your Primary Key is of identity type then see if you can incorporate this in you statement.
Code:
SELECT *
FROM TABLE
WHERE ID = (SELECT MAX(ID) FROM TABLE)
-
March 18th, 2010, 03:38 PM
#3
Re: sql server ce query question
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|