It's a right outer join.

On 8/24/07, Mike Kear <[EMAIL PROTECTED]> wrote:
>
> I have inherited an app which has an old query that's now not working,
> because the new database we're using doesn't have backwards compatibility
> set.  I could ask the sysadmin to set backwards compatiblity but i'd
> rather
> correct the query to use current syntax.
>
> My question is, since this syntax is old and dates back to about the time
> I
> came into this game,  can someone help me be certain what this query is
> supposed to be doing?
>
> Here's the query as written, that's now giving an error:
>
> SELECT
> o.*,
> s.name+' | '+s.subname AS status,
> u.uOrgName AS custName,
> c.cCountry AS dest_country,
> io.fk_invoice
>
> FROM nw_orders o, nw_order_status s, nw_users u, nw_country c,
> nw_invoice_orders io
>
> WHERE o.fk_user=u.pk
> AND o.delivery_country=c.pk
> AND io.fk_order=*o.pk
> AND o.fk_order_status=s.pk
>
> ORDER BY dt_created DESC
>
>
> The bit that's making SQLServer barf is the
> AND io.fk_order=*o.pk
>
> So before I go tinkering about with this query I need to be sure what it's
> supposed to do.   So what's the current syntax equivalent to this query
> please?
>
>
> --
> Cheers
> Mike Kear
> Windsor, NSW, Australia
> Adobe Certified Advanced ColdFusion Developer
> AFP Webworks
> http://afpwebworks.com
> ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2914
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to