Hi. My enviroment is Arcgis 9.3.1 SP2 and SDE.
I have a problem constructing a QueryDef. I need a self join but it is a problem since a cannot use aliases in a QueryDef.
My SQL query is something like this:
SELECT id
FROM table a, table b
WHERE a.id = b.id
AND a.start_date = b.end_date
id | start_date | end_date | more data....
181 | 01/02/2012 | 30/02/2012 | ...
181 | 01/01/2012 | 01/02/2012 | ...
I would get this 181.
If I launch it in SQL Server I get the waited result I don't know how to resolve this making a QueryDef.
Thanks in advance!
I have a problem constructing a QueryDef. I need a self join but it is a problem since a cannot use aliases in a QueryDef.
My SQL query is something like this:
SELECT id
FROM table a, table b
WHERE a.id = b.id
AND a.start_date = b.end_date
id | start_date | end_date | more data....
181 | 01/02/2012 | 30/02/2012 | ...
181 | 01/01/2012 | 01/02/2012 | ...
I would get this 181.
If I launch it in SQL Server I get the waited result I don't know how to resolve this making a QueryDef.
Thanks in advance!