Question : SCCM Query to Report

Hi everybody,

I would like to create a report using a query that i made which is scanning a registry key, it works fine but when i try to copy the SQL code (cf in code attachments) from my query and paste it into my new report i've got this error :

An error occurred when the report was run. The details are as follows:
Invalid object name 'SMS_R_System'.
Error Number: -2147217865
Source: Microsoft OLE DB Provider for SQL Server
Native Error: 208


I have to admit that i'm a rookie in SCCM and i hope my question will be clear enough for answer it.

If you need more éléments or trace log i will post it in this tread.

Regards & thanks for sharing Knowledge.

 
1:
select SMS_G_System_CUSTOM_WIN32REG_PCKG_1_0.* from  SMS_R_System inner join SMS_G_System_CUSTOM_WIN32REG_PCKG_1_0 on SMS_G_System_CUSTOM_WIN32REG_PCKG_1_0.ResourceId = SMS_R_System.ResourceId

Answer : SCCM Query to Report

Hi SUR-PTR the problem is that Queries are WQL and Reports are SQL so you basically need to convert the WQL to SQL.  For instance you'll find that SMS_R_System view doesn't exist in the Report SQL Properties, rather v_R_System.

You will also need to check that the custom registry is being captured to the SCCM Database otherwise you're not going to be able to query for it.  This is usually done using custom mof files.
http://scug.be/blogs/sccm/archive/2008/08/29/sccm-customizing-the-hardware-inventory-to-report-a-custom-registry-file.aspx

Sorry couldn't be of more service.

Cheers
Random Solutions  
 
programming4us programming4us