Jump to content

Not all records


cgxavier
 Share

Recommended Posts

I have here a formula that will give me one individual record at a time, that is the max for that record or the latest one. I have trouble figuring how to get all max records, that is beign able to see all the records at one time.Thank you for the helpSELECT [sn].[WrkstaId] ,[sn].[Computer Model] ,[sn].[serial Number] ,[sn].[Asset Tag] ,[sn].[Computer Type] ,[id].[Name] ,[id].[Domain] ,[id].[OS Name] ,[id].[OS Type] ,[id].[Last Logon User] ,[id].[Last Logon Domain] ,[id].[Client Date] FROM [Altiris].[dbo].[AeXInv_AeX_HW_Serial_Number] sn INNER JOIN [Altiris].[dbo].[AeXInv_AeX_AC_Identification] id ON [sn].[WrkstaId]=[id].[WrkstaId] WHERE [sn].[WrkstaId]=(SELECT MAX([WrkstaId]) FROM [Altiris].[dbo].[AeXInv_AeX_HW_Serial_Number] WHERE [serial Number]= '81MSLD1') ORDER BY [sn].[_id] DESC

Link to comment
Share on other sites

If you get rid of the WHERE clause all records will be displayed
i knowt now with your help that by removing WHERE Clause it will display all the records. Tha's good. ButIm using this query: WHERE [sn].[WrkstaId]=(SELECT MAX([WrkstaId]) FROM [Altiris].[dbo].[AeXInv_AeX_HW_Serial_Number] WHERE [serial Number]= '81MSLD1')This will give me individual records and it will give the MAX or the most recent of what ever record i call for individually, but i need to see all records without Duplicates, I know that i can use DISTINCT but im now sure how or if there's some other way to manipulate the data so i can get # of records rathere than # + records.I hope that you understand Thank you
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...