Question

Locked

Sql Help for ANSI Character like *=

By mailtossaini ·
hi,

below are my queries where =* is giving output(1 record) but left outer join query is not giving output althought both are same query, can anybody help me its urgent?

SELECT TC.Testcasecode, TC.VersionNumber, TC.Description, FA.FunctionalAreaName as FAName, SFA.SubfuncName as SFAName,
PRC.ProcessName, MD.Description as RiskRating, UP.UserName as TestOwner, FM.Description as Frequency, AD.FieldName ,
AD.OldValue , TR.Status, UPTP.UserName as PerfUser, TR.PerformedDate as PerfDate, TR.TestDate, TR.Observation,
COALESCE(TR.ResolutionDate,'1/1/1900 12:00:00 AM') as ResolutionDate , COALESCE(TR.ModifiedDate,'1/1/1900 12:00:00 AM')
as ModifiedDate from Testcase TC, FunctionalArea FA, SubFunctionalArea SFA, Process PRC, MasterData MD ,
UserProfile UP, FreqMaster FM, TestResults TR Left outer join UserProfile UPTP on TR.PerformedUser = UPTP.UserId
Left outer join AuditTrail AD on cast(AD.primarykey1value as varchar) = cast(TR.testcasecode as varchar)
and AD.primarykey2value = TR.TestDate where FA.FunctionalAreaCode = TC.FACode
and SFA.SFACode = TC.SFACode and PRC.ProcessCode = TC.ProcessCode and MD.Masterkey = TC.RiskRating and
TC.AssignedToUser = UP.UserId and TR.TestDate = (select max(TestDate) from TestResults where
Testcasecode = TC.Testcasecode) and TR.Testcasecode = 329 and TR.Testcasecode = TC.Testcasecode and
FM.FrequencyKey = TC.FrequencyKey and AD.businessFunction='TestResults' and AD.ChangeInstance =
( select max( changeInstance) from audittrail where businessFunction='TestResults' and TR.testcasecode =
primarykey1value and TR.testdate = primarykey2value )



SELECT TC.Testcasecode, TC.VersionNumber, TC.Description, FA.FunctionalAreaName as FAName, SFA.SubfuncName as SFAName,
PRC.ProcessName, MD.Description as RiskRating, UP.UserName as TestOwner, FM.Description as Frequency, AD.FieldName ,
AD.OldValue , TR.Status, UPTP.UserName as PerfUser, TR.PerformedDate as PerfDate, TR.TestDate, TR.Observation,
COALESCE(TR.ResolutionDate,'1/1/1900 12:00:00 AM') as ResolutionDate , COALESCE(TR.ModifiedDate,'1/1/1900 12:00:00 AM')
as ModifiedDate from Testcase TC, FunctionalArea FA, SubFunctionalArea SFA, Process PRC, MasterData MD,
TestResults TR, UserProfile UP, AuditTrail AD, FreqMaster FM, UserProfile UPTP where FA.FunctionalAreaCode
= TC.FACode and SFA.SFACode = TC.SFACode and PRC.ProcessCode = TC.ProcessCode and MD.Masterkey = TC.RiskRating
and TC.AssignedToUser = UP.UserId and TR.PerformedUser *= UPTP.UserId and TR.TestDate
= (select max(TestDate) from TestResults where Testcasecode = TC.Testcasecode) and TR.Testcasecode = 329
and TR.Testcasecode = TC.Testcasecode and FM.FrequencyKey = TC.FrequencyKey and AD.businessFunction='TestResults'
and cast(AD.primarykey1value as varchar) =* cast(TR.testcasecode as varchar) and AD.primarykey2value =* TR.TestDate
and AD.ChangeInstance = ( select max( changeInstance) from audittrail where businessFunction='TestResults' and
TR.testcasecode = primarykey1value and TR.testdate = primarykey2value )

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums