Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: sql query help


Message #1 by "Abraham Luna" <abe@a...> on Wed, 23 Oct 2002 16:38:42 -0400
Abraham,

Try this.


	SELECT DISTINCT Stock, COUNT(*)
	FROM Inventory
	<WHERE clause optional>
	GROUP BY Stock
	HAVING COUNT(*) > 1



Regards,
Rommel


-----Original Message-----
From: Abraham Luna [mailto:abe@a...]
Sent: Wednesday, October 23, 2002 1:39 PM
To: professional vb
Subject: [pro_vb] sql query help


i need to select all the rows from a database that have dublicate stock #'s

i know 'SELECT DISTINCT(Stock) FROM Inventory' will not select duplicate
rows, but you can't negate that. any help please.


---------
i'm using visual studio .net on windows 2000 pro


---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059



  Return to Index