July 14, 2004 at 3:25 am
I have a colleague who is trying to customize an index server page and this page uses an index server specific version of SQL. Imagine T-SQL with the best bits missing (echoes of Sybase:cool.
One of the problems he has is that he wants to do the equivalent of
WHERE <field> <GETDATE()
The actual code is
// Construct the base query.
string query = String.Format(@"
SET PROPERTYNAME 'd1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1' PROPID 'dteexpiredstr' AS dteexpiredstr
SET PROPERTYNAME 'd1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1' PROPID 'dteexpiredis' AS dteexpiredis
SET PROPERTYNAME 'd1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1' PROPID 'title' AS title
SELECT title, dteexpiredstr, dteexpiredis, Rank, DocTitle, VPath, Filename, Characterization, Write
FROM SCOPE('DEEP TRAVERSAL OF ""{0}""')
WHERE NOT CONTAINS(VPath, '""_vti_"" OR "".config""')
AND (dteexpiredis = '06/07/2004 11:50:00')",
The problem is that date comparisons simply don't work and there doesn't seem to be a cast or convert statement available within index server.
dteexpiredis is a field of type VT_FILETIME, whatever that is.
We have tried string, integer and date comparisons but to no avail.
If anyone has experience with this I should be grateful to hear from them.
July 14, 2004 at 1:58 pm
I assume you have, but did you CAST both the variables to something?
July 15, 2004 at 7:11 am
CAST and CONVERT cause syntax errors in Index Server.
Index server SQL looks like "proper" SQL, but as I said, it seems to leave out all the useful bits!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply