[SPTUsers] SQL Data Call

Wakefield, Beth USA Contractor ejwakefi at nps.navy.mil
Wed Aug 27 16:01:19 CDT 2003


no, sorry it didn't work
Beth

-----Original Message-----
From: Cornejo, Luis [mailto:lcornejo at dep.anl.gov] 
Sent: Wednesday, August 27, 2003 3:01 PM
To: Wakefield, Beth USA Contractor ; sptusers at scout.wisc.edu
Subject: RE: [SPTUsers] SQL Data Call



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/3051a2b4/attachment.htm


More information about the SPTUsers mailing list