General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>SELE TRANS_VNO, TRANS_DATE, TRANS_CODEFK, GLMST_NAME, TRANS_PART, TRANS_AMT, ;
>>TR2_CODE, GLMST_NAME, TR2_PART, TR2_AMT ;
>>FROM ACTRANS, ACGLMST, ACTR2 WHERE TRANS_CODEFK=GLMST_CODEPK AND ;
>>TRANS_KEYPK=TR2_KEYFK
>>
>>Can somebody give me the correct sql to get the right Glmst name...
>
>It looks like your missing a join condition between TR2 and GL Master, so your probably getting the same GLMST_NAME in both columns?
>
>what about something like...
>WHERE TRANS_CODEFK=GLMST_CODEPK ;
> AND TRANS_KEYPK=TR2_KEYFK ;
> AND TR2_CODEFK = GLMST_CODEPK
Thanks for your reply...
I tried this but it is not showing all the records...
Pls note that there is 1 to many relaiton between trans & tr2...
Pls advs..
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only