Hi,
I have a SQL in Non-ANSI standard which returns different result when i change the SQL according to ANSI norms.
these SQL were ran against MS SQL Server 2000 and 2005.
could someone help me if this is wrong conversion or a Microsoft bug.
SQL in Non-ANSI standard
SELECT
dbo.issue_s.ref_num,
dbo.ca_location.comments,
dbo.ca_location.location_name,
AHD_ctct_Assignee.last_name +' '+ AHD_ctct_Assignee.first_name,
dbo.issue_s.description,
dbo.issue_s.z_Exit_date,
dbo.issue_s.z_Arrive_date,
dbo.issue_s.z_Done_date,
dbo.zAssetdetail.sym,
dbo.zAssetfamily.sym,
dbo.zFixtype.sym,
dbo.zAssetparts.sym,
dbo.issue_s.z_carNo,
dbo.issue_s.close_date,
dbo.issue_s.flag1,
datediff(minute,dbo.issue_s.z_Arrive_date,dbo.issu e_s.z_Exit_date)/60
FROM
dbo.issue_s,
dbo.ca_location,
dbo.ca_contact AHD_ctct_Assignee,
dbo.zAssetdetail,
dbo.zAssetfamily,
dbo.zFixtype,
dbo.zAssetparts,
dbo.ca_contact AHD_ctct_Requestor
WHERE
( dbo.issue_s.requestor=*AHD_ctct_Requestor.contact_ uuid )
AND ( dbo.issue_s.assignee=*AHD_ctct_Assignee.contact_uu id )
AND ( AHD_ctct_Requestor.location_uuid=*dbo.ca_location. location_uuid )
AND ( dbo.issue_s.z_fix_type=*dbo.zFixtype.persid )
AND ( dbo.issue_s.z_asset_family=*dbo.zAssetfamily.persi d )
AND ( dbo.zAssetparts.persid*=dbo.issue_s.z_asset_parts )
AND ( dbo.zAssetdetail.persid*=dbo.issue_s.z_asset_detai l )
SQL in ANSI standard
SELECT
dbo.issue_s.ref_num,
dbo.ca_location.comments,
dbo.ca_location.location_name,
AHD_ctct_Assignee.last_name +' '+ AHD_ctct_Assignee.first_name,
dbo.issue_s.description,
dbo.issue_s.z_Exit_date,
dbo.issue_s.z_Arrive_date,
dbo.issue_s.z_Done_date,
dbo.zAssetdetail.sym,
dbo.zAssetfamily.sym,
dbo.zFixtype.sym,
dbo.zAssetparts.sym,
dbo.issue_s.z_carNo,
dbo.issue_s.close_date,
dbo.issue_s.flag1,
datediff(minute,dbo.issue_s.z_Arrive_date,dbo.issu e_s.z_Exit_date)/60
FROM
dbo.ca_location LEFT OUTER JOIN dbo.ca_contact AHD_ctct_Requestor ON (AHD_ctct_Requestor.location_uuid=dbo.ca_location. location_uuid)
LEFT OUTER JOIN dbo.issue_s ON (dbo.issue_s.requestor=AHD_ctct_Requestor.contact_ uuid)
RIGHT OUTER JOIN dbo.ca_contact AHD_ctct_Assignee ON (dbo.issue_s.assignee=AHD_ctct_Assignee.contact_uu id)
RIGHT OUTER JOIN dbo.zFixtype ON (dbo.issue_s.z_fix_type=dbo.zFixtype.persid)
RIGHT OUTER JOIN dbo.zAssetfamily ON (dbo.issue_s.z_asset_family=dbo.zAssetfamily.persi d)
RIGHT OUTER JOIN dbo.zAssetparts ON (dbo.zAssetparts.persid=dbo.issue_s.z_asset_parts)
RIGHT OUTER JOIN dbo.zAssetdetail ON (dbo.zAssetdetail.persid=dbo.issue_s.z_asset_detai l)