Hi, you may try:
SELECT DISTINCT portlet.*
FROM portletAssignment PortletAssignment,
portlet LEFT JOIN UserTabAssignment UTA
ON (portlet.name=UTA.portlet_fk AND UTA.user_fk = 'guest' AND
UTA.portal_FK = 'mysqlPortal' AND UTA.tabNumber = 0 AND
UTA.subtabName = 'firstSubtab')
WHERE PortletAssignment.Group_FK in ('group1', 'group2')
AND UTA.portlet_fk IS NULL
Remember that your query (and also this) may have a problem because
there is no relation between portletAssignment and portlet (you didn't
specify any join, so i couldn't use one).
On Tue, 2003-02-18 at 17:11, Alice Farbles wrote:
> Hi,
>
> I am having trouble to convert the following query with a sub query to use
> a join, any advice I would be most grateful
>
> Select Distinct portlet.* from portlet, portletAssignment PortletAssignment
> where PortletAssignment.Group_FK in ('group1', 'group2')
> AND portlet.name not in (
> SELECT portlet_fk FROM UserTabAssignment WHERE user_fk = 'guest' AND
> portal_FK = 'mysqlPortal' AND tabNumber = 0 AND subtabName =
> 'firstSubtab')
>
> thanks
>
> Alice Farbles
--
Diana Soares
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php