
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2011 11:34 PM
Hello,
I have modified and already existing SQL query and applied my own search conditions. I had two conditions in the same query, one saying I want LIKE This and NOT LIKE That but then it creates two rows and this makes it impossible to sort the data of these rows because they exist twice...
What's the other way to apply a NOT LIKe and being possible to sort with the small GUID in the Report Builder?
Thank you!
Here's the SQL Query.
I have modified and already existing SQL query and applied my own search conditions. I had two conditions in the same query, one saying I want LIKE This and NOT LIKE That but then it creates two rows and this makes it impossible to sort the data of these rows because they exist twice...
What's the other way to apply a NOT LIKe and being possible to sort with the small GUID in the Report Builder?

Thank you!
Here's the SQL Query.
Select Top 1000000 tblSoftware.softwareName As Software, tblComputers.Username
As Usager, tblADusers.Displayname As DisplayName, tblADusers.OU As OU
From tblComputers Left Join
tblSoftware On tblComputers.Computername = tblSoftware.ComputerName Inner Join
tblADusers On tblADusers.Username = tblComputers.Username
Where tblSoftware.softwareName Like 'Microsoft%Project%' And
Not tblSoftware.softwareName Like '%SQL%'
Group By tblSoftware.softwareName, tblComputers.Username,
tblADusers.Displayname, tblADusers.OU, tblSoftware.Lastchanged
Order By tblComputers.Username, tblSoftware.softwareName
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2011 05:44 PM
Perfect, works like a charm!
Thank you.
Thank you.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2011 04:18 PM
Please try the following query:
Select Top 1000000 tblSoftware.softwareName As Software, tblComputers.Username
As Usager, tblADusers.Displayname As DisplayName, tblADusers.OU As OU
From tblComputers Left Join
tblSoftware On tblComputers.Computername = tblSoftware.ComputerName Inner Join
tblADusers On tblADusers.Username = tblComputers.Username
Group By tblSoftware.softwareName, tblComputers.Username,
tblADusers.Displayname, tblADusers.OU, tblSoftware.Lastchanged
Having (tblSoftware.softwareName Like 'Microsoft%Project%' And
tblSoftware.softwareName Not Like '%SQL%')
Order By tblComputers.Username, tblSoftware.softwareName
