Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
i_kulgu
Champion Sweeper
Hallo,

I'm testing the Lansweeper Report Builder.
I made a report which is reporting the computers with purchase date = 2005
My question is: "How can I make a report with computers previously purchased than 2009"

This is what i got so far:

SELECT DISTINCT 
tblComputers.Computername,
tblCompCustom.Custom1
FROM
tblComputers
INNER JOIN tblCompCustom ON (tblComputers.Computername = tblCompCustom.Computername)
WHERE
tblCompCustom.Custom1 = < 2009


The purchase year is on custom1.
But when I want to test it, it says : "Line 8: Incorrect syntax near '<' "

Hope you can help me guys.
8 REPLIES 8
i_kulgu
Champion Sweeper
I already solved it.
Thank you for helping.

It has to be :

SELECT DISTINCT dbo.tblComputers.Computername, dbo.tblCompCustom.Custom1
FROM dbo.tblComputers INNER JOIN
dbo.tblCompCustom ON dbo.tblComputers.Computername = dbo.tblCompCustom.Computername
WHERE (dbo.tblCompCustom.Custom1 <= '2009')
i_kulgu
Champion Sweeper



On custom1 is the yeas of purchase filled.
Hemoco
Lansweeper Alumni
What kind of data is filled in in Custom1?
Could you post an output?
i_kulgu
Champion Sweeper
I've got an empty report.
It works but blank output.
Hemoco
Lansweeper Alumni
Try this :

SELECT DISTINCT dbo.tblComputers.Computername, dbo.tblCompCustom.Custom1
FROM dbo.tblComputers INNER JOIN
dbo.tblCompCustom ON dbo.tblComputers.Computername = dbo.tblCompCustom.Computername
WHERE (dbo.tblCompCustom.Custom1 >= '2009')
i_kulgu
Champion Sweeper
I tried that + double quotes around 2009 but neither single, nor double quotes helped.
I still get the same error.
Hemoco
Lansweeper Alumni
Could you try adding single quotes around 2009
'2009'
i_kulgu
Champion Sweeper
Doesn't anybody know how to do this ?