I am create report based on workidcreateddate and time in warehose manage ment. this the main tables how can i join these table
WHSWorkTable wHSWorkTable; WHSWorkLine wHSWorkLine; PwCAdviceMainTable pwCAdviceMainTable; PwCRTWInquires pwCRTWInquires; SalesTable salesTable; CustTable custTable; EcoResProductCategory ecoResProductCategory; InventTransferJour inventTransferJour; InventItemBarcode inventItemBarcode; PwCItemApproval pwCItemApproval; InventTable inventTable; InventDim inventDim;
give me any one suggestion.
It depends on what data you want to show in the report. Most them look standard tables, you can look at the relations between them try writing a query. Give a try and let us know for any questions.
SreeKumarReddy said:PwCAdviceMainTable pwCAdviceMainTable; PwCRTWInquires pwCRTWInquires;
Looks like custom tables. Try investigating the relations.
this two table are custom table sir. PwCAdviceMainTable realation between salestable based on salesid and pwCRTWInquires is relation to whsworkline based on workid.
how to write the query statement tell me sir.when i run the report its taking so much of time
SreeKumarReddy said:.when i run the report its taking so much of time
If you already have the query and it is taking much time to run, then you need to optimize it.
I just another duplicate post of your of the same requirement.
Please use the same thread and don't repeat the same questions multiple times.
sir , i am written this code in process report but report its taking so much of time
select wHSWorkLine join pwCRTWInquires where pwCRTWInquires.WorkId == wHSWorkLine.WorkId;
select salesTable join pwCAdviceMainTable where pwCAdviceMainTable.SalesId ==salesTable.SalesId join custTable where custTable.AccountNum == pwCAdviceMainTable.CustAccount; select * from inventTransferJour;
report excuetion is its taking so much of time , how to reduce this tell me. i am written this code
select wHSWorkLinejoin pwCRTWInquireswhere pwCRTWInquires.WorkId == wHSWorkLine.WorkId;
select salesTablejoin pwCAdviceMainTablewhere pwCAdviceMainTable.SalesId ==salesTable.SalesIdjoin custTablewhere custTable.AccountNum == pwCAdviceMainTable.CustAccount;select * from inventTransferJour;
It depends on how you are going to use the data returned by these select statements. Remove unnsessary table
SreeKumarReddy said:select wHSWorkLinejoin pwCRTWInquireswhere pwCRTWInquires.WorkId == wHSWorkLine.WorkId;
Example - If you are not using any fields from pwCRTWInquires use can change it to exists join. Use field list in the select statement.
SreeKumarReddy said:select * from inventTransferJour;
Why is this select? You are just selecting with out any condition.
sir i am writeen this code but still its taking lot of time
select wHSWorkLine index hint WorkIdLineNumIdx join wHSWorkTable where wHSWorkTable.WorkId == wHSWorkLine.WorkId && wHSWorkTable.createdDateTime >= fromDateTime && wHSWorkTable.createdDateTime <= toDateTime join pwCRTWInquires index hint WorkId where pwCRTWInquires.WorkId == wHSWorkTable.WorkId join pwCAdviceMainTable where pwCAdviceMainTable.CustAccount == pwCRTWInquires.CustAccount join custTable index hint AccountIdx where custTable.AccountNum == pwCAdviceMainTable.CustAccount;