SCCM Report Query Syntax
In all releases of SMS 2003 (RTM through SP3), with either SQL Server 2000 or 2005 as the back end, the following query syntax was permitted and worked: WHERE PROT.Name0 LIKE "%IPV6%"In SCCM, that clause produces this error: An error occurred when the report was run. The details are as follows: Invalid column name '%IPV6%'. Error Number: -2147217900 Source: Microsoft OLE DB Provider for SQL Server Native Error: 207To fix it requires use of single quote literal delimiter: WHERE PROT.Name0 LIKE '%IPV6%'This will be a major migration pain for us. If anyone knows of a method to restore use of double-quotes, we'd be much obliged.Jeff Kantner
May 12th, 2009 10:18pm
At a former job, I didn't have a ton of those, but if I recall correctly, I think I just ran a sql query aganst the report view; probably something like this:select * from v_report where sqlquery like '%"%'just to get the reportid's affected. Then I ran each affected report and fixed them until they ran right. There's probably some SQL guru out there that could script changing a " to a ' within the SQLQuery field, but for me just finding them so I could fix them manually was good enough at the time.Standardize. Simplify. Automate.
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2009 4:42am
If anyone knows of a method to restore use of double-quotes, we'd be much obliged.
This has nothing to with ConfigMgr, it is the way that you setupSQL. To prove this open query window in SQL Server Management Studio.
Run this query (replace SCCM with a PC in your db)
Select name0 from v_gs_computer_system
where name0 like "%sccm%"
Notice that it fails
Now run this query
SET QUOTED_IDENTIFIER OFF
Select name0 from v_gs_computer_system
where name0 like "%sccm%"
Notice that this will work. As for fixing it for your SQL setup.. Im not sure what is the best way to do this you might want to try the SQL forums.
May 13th, 2009 3:50pm
I am having the same issue any thoughts?
Free Windows Admin Tool Kit Click here and download it now
February 4th, 2010 12:03pm
I am having the same issue any thoughts?
Yes, in SQL change your quote Identifiers.http://www.enhansoft.com/
February 4th, 2010 3:19pm
Hi,We stopped banging our heads on the wall. Dumped all the reports to a .mof file, wrote a script to pick out and fix the problem string references.Did this on the way to migrating them to SCCM.Language syntax changes over time, and sometimes variations are allowed for awhile but a later syntax checker tightens the screws.Comes with the IT territory. We get used to it, and move on.Cheers,Jeff Kantner
Free Windows Admin Tool Kit Click here and download it now
February 5th, 2010 12:19am