I am trying to do a Crystal sql query and it is driving me absolutely
bonkers becuase I cant see what the heck I am doing wrong. I have attached
the query and I have tested out each piece - it craps out when it gets to
the LAST AND line -- AND PROBLEM."STOPDATE" >= NOW()
The error message is telling me "invalid column name" -
The problem.stopdate field is a datetime field....any ideas? I'm stumped.
Any ideas are really welcome. I do realize this could and should be in a
stored procedure, but circumstances dont allow that -- (ultra paranoid tech
department)
SELECT DISTINCT
PERSON."PID", PERSON."LASTNAME", PERSON."FIRSTNAME",
PERSON."DATEOFBIRTH", PERSON."SEX", PERSON."RACE",
PERSON."EXTERNALID"
FROM
"ML"."PERSON" PERSON
WHERE
PERSON."PID" in
(SELECT DISTINCT
PROBLEM."PID"
FROM
"ML"."PROBLEM" PROBLEM
WHERE
PROBLEM."CODE" >= 'ICD-250.00' AND PROBLEM."CODE" <= 'ICD-250.00'
******** this is where it stops working -
AND PROBLEM."STOPDATE" >= NOW())
*******
ORDER BY
PERSON."PID" ASC
LMC cryerlisa@hotmail.com
select * from Management where proj_mgmt_skills <> NULL
0 records returned
bonkers becuase I cant see what the heck I am doing wrong. I have attached
the query and I have tested out each piece - it craps out when it gets to
the LAST AND line -- AND PROBLEM."STOPDATE" >= NOW()
The error message is telling me "invalid column name" -
The problem.stopdate field is a datetime field....any ideas? I'm stumped.
Any ideas are really welcome. I do realize this could and should be in a
stored procedure, but circumstances dont allow that -- (ultra paranoid tech
department)
SELECT DISTINCT
PERSON."PID", PERSON."LASTNAME", PERSON."FIRSTNAME",
PERSON."DATEOFBIRTH", PERSON."SEX", PERSON."RACE",
PERSON."EXTERNALID"
FROM
"ML"."PERSON" PERSON
WHERE
PERSON."PID" in
(SELECT DISTINCT
PROBLEM."PID"
FROM
"ML"."PROBLEM" PROBLEM
WHERE
PROBLEM."CODE" >= 'ICD-250.00' AND PROBLEM."CODE" <= 'ICD-250.00'
******** this is where it stops working -
AND PROBLEM."STOPDATE" >= NOW())
*******
ORDER BY
PERSON."PID" ASC
LMC cryerlisa@hotmail.com
select * from Management where proj_mgmt_skills <> NULL
0 records returned