Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 please change this query to left outer join

Author  Topic 

rajadadi
Starting Member

30 Posts

Posted - 2010-04-29 : 04:09:40

pls change to left outer join


SELECT dbo.AST_Configuration_Item__CI_.Name[CI Name], dbo.field_enum_values.Value,
dbo.AST_Configuration_Item__CI_.CI_Status[CI Status], dbo.AST_CI_Component_Associations.Association_Type01 AS [ Association Type],
dbo.AST_CI_Component_Associations.Dependency, dbo.AST_CI_Component_Associations.Topology, dbo.AST_CI_Component_Associations.Installed,
dbo.AST_CI_Component_Associations.Allocated, dbo.AST_CI_Component_Associations.Language,
dbo.AST_CI_Component_Associations.Request_Description01 AS [Software Name],
dbo.AST_CI_Component_Associations.Submit_Date AS [Association Date],
AST_Configuration_Item__CI__1.Name AS [Software CI Name], AST_Configuration_Item__CI__1.System_Roles AS [Software CI Class],
AST_Configuration_Item__CI__1.Product_Model_Version AS [Version Number]
FROM dbo.AST_Configuration_Item__CI_ CROSS JOIN
dbo.AST_CI_Component_Associations CROSS JOIN dbo.field_enum_values CROSS JOIN
dbo.AST_Configuration_Item__CI_ AS AST_Configuration_Item__CI__1
WHERE (dbo.AST_CI_Component_Associations.Association_Type01 = 'License to') AND AST_Configuration_Item__CI__1.System_Roles IS NOT NULL
AND dbo.AST_CI_Component_Associations.Request_Description01 = 'ActiveX Controls CAD Users 1' and
(dbo.AST_Configuration_Item__CI_.Company = 'Canada Post Corporation')

rajesh

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-04-29 : 04:13:29
The formatted query looks like this:
SELECT dbo.ast_configuration_item__ci_.name                    [CI Name], 
dbo.field_enum_values.VALUE,
dbo.ast_configuration_item__ci_.ci_status [CI Status],
dbo.ast_ci_component_associations.association_type01 AS [ Association Type],
dbo.ast_ci_component_associations.dependency,
dbo.ast_ci_component_associations.topology,
dbo.ast_ci_component_associations.installed,
dbo.ast_ci_component_associations.allocated,
dbo.ast_ci_component_associations.LANGUAGE,
dbo.ast_ci_component_associations.request_description01 AS [Software Name],
dbo.ast_ci_component_associations.submit_date AS [Association Date],
ast_configuration_item__ci__1.name AS [Software CI Name],
ast_configuration_item__ci__1.system_roles AS [Software CI Class],
ast_configuration_item__ci__1.product_model_version AS [Version Number]
FROM dbo.ast_configuration_item__ci_
CROSS JOIN dbo.ast_ci_component_associations
CROSS JOIN dbo.field_enum_values
CROSS JOIN dbo.ast_configuration_item__ci_ AS ast_configuration_item__ci__1
WHERE ( dbo.ast_ci_component_associations.association_type01 = 'License to' )
AND ast_configuration_item__ci__1.system_roles IS NOT NULL
AND dbo.ast_ci_component_associations.request_description01 = 'ActiveX Controls CAD Users 1'
AND ( dbo.ast_configuration_item__ci_.company = 'Canada Post Corporation' )



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-04-29 : 04:14:38
Like stated in another thread:
We need the relations between the tables.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -