[SPTUsers] SQL Data Call
Cornejo, Luis
lcornejo at dep.anl.gov
Wed Aug 27 18:00:56 CDT 2003
Just modify you query just a little bit:
SELECT p1.Resources.Title, p1.Resources.URL, p1.Resources.Description
FROM ResourceNameInts as p1, ResourceNameInts as p2 INNER JOIN Resources ON
p1.ResourceId = Resources.ResourceId
WHERE (p1.ControlledNameId= '100') AND (p2.ControlledNameId='103')
-Luis-
-----Original Message-----
From: Wakefield, Beth USA Contractor [mailto:ejwakefi at nps.navy.mil]
Sent: Wednesday, August 27, 2003 12:51 PM
To: sptusers at scout.wisc.edu
Subject: [SPTUsers] SQL Data Call
I'm trying to call some data out of SPT with a SQL statement like this one,
I want data where ControlledNameId=100 AND 103 not OR. This seems to be the
problem.
SELECT Resources.Title, Resources.URL, Resources.Description
FROM ResourceNameInts INNER JOIN Resources ON ResourceNameInts.ResourceId =
Resources.ResourceId
WHERE (ResourceNameInts.ControlledNameId= '100') AND
(ResourceNameInts.ControlledNameId='103')
I also tried this: with no luck.
SELECT Resources.Title, Resources.URL, Resources.Description
FROM ResourceNameInts INNER JOIN Resources ON ResourceNameInts.ResourceId =
Resources.ResourceId
WHERE ResourceNameInts.ControlledNameId
IN('100', '103')
GROUP BY ResourceId
Having Count(ResourceId)=2
If someone can please help me with this query it would be greatly
appreciated! Thanks in advance.
Beth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://scout.wisc.edu/pipermail/sptusers/attachments/20030827/54577171/attachment.htm
More information about the SPTUsers
mailing list