In excel I am using Get external data. Then I am picking up information from an sqlserver.
My query is not giving the results back correctly.
I get all the data back when I have entered certain criteriae.
In the criteria box, I have 3 fields.
Eventdate is a criteria field, value is Between [Enter Start Date:] And [Enter End Date:]
and I also have the criteria field DisplaySrcIPAddress, in value I put [Enter Source IP:] and DisplayDestIPAddress is another criteria field, but this one I put the value in the OR section- [Enter Destination IP:]
The eventdate is a datetime field with a format like 2003-04-08 23:12:01.000
This is the sql:
SELECT EventDate, SrcIP, DestIP
FROM Events, EventParams
WHERE EventID = EventPar.EventID AND ((Events.EventDate Between ? And ?) AND (Events.DisplaySrcIPAddress=?) OR (Events.DisplayDestIPAddress=?))
But it gives me back all the data.
How can I fix this?
thanks,
olmos
My query is not giving the results back correctly.
I get all the data back when I have entered certain criteriae.
In the criteria box, I have 3 fields.
Eventdate is a criteria field, value is Between [Enter Start Date:] And [Enter End Date:]
and I also have the criteria field DisplaySrcIPAddress, in value I put [Enter Source IP:] and DisplayDestIPAddress is another criteria field, but this one I put the value in the OR section- [Enter Destination IP:]
The eventdate is a datetime field with a format like 2003-04-08 23:12:01.000
This is the sql:
SELECT EventDate, SrcIP, DestIP
FROM Events, EventParams
WHERE EventID = EventPar.EventID AND ((Events.EventDate Between ? And ?) AND (Events.DisplaySrcIPAddress=?) OR (Events.DisplayDestIPAddress=?))
But it gives me back all the data.
How can I fix this?
thanks,
olmos