Link to home
Start Free TrialLog in
Avatar of sarika2923
sarika2923

asked on

Need Help with Stored Procedure

Hello I need help with the stored procedure.

I need to write logic to get the data for a specific date range and Shift.

Here's the Requirement:

Parm: CTS (1 model only) + P_BLACK_41 (1 color only) + date range (start-end) + 1 (1 shift only)   OR

Parm: ALL (all models) + all (all colors) + date range (start-end) + all (all shifts) OR

Parm: model (1 model only) + color (1 color only) + Number of Vehicles + shift   (1 shift only)   OR

Parm: all (all models) + all (all colors) + Number of Vehicles + (all shifts)  

I dont know how i can share the existing stored procedure with you

Please help me.

Thanks,
Siri
Avatar of sarika2923
sarika2923

ASKER

Hello,

I need help with the attached stored procedure,

All i need is a logic to get the data as per the requirement listed above.

Please help me.

Thanks,
Sarika
S.txt
Avatar of Lowfatspread
the detail and assistance you require should be sought from the designer of the system...
go and ask the analyst who specified the requirement for this procedure to assist in the detail of what is required....

ask to see the specification,...


specifically you need to know ]
which tables the shift is derived from
which tables the date range is to be applied to ...

the procedure should be amended to include more comments on it intended function and how it basically operates...

an example(s) of input and output  in the description would also prove useful for future maintenance/troubleshooting efforts...
The Shift comes from DIM_CALENDER Table.
The Date ranges apply to Fact.Atrbt_Proprt Table and Fact_Trackg_Procs_Area.

The stored procedure should return the data, for 11 columns listed in the attached Excel sheet as per the following filtering criteria.

Parm: model (1 model only) + color (1 color only) + date range (start-end) + shift (1 shift only)   OR
Parm: model (1 model only) + color (1 color only) + Number of Vehicles + shift   (1 shift only)
123.xlsx
Hi,

In SSMS navigate to the procedure and Right click and select Script Stored Procedure as Create ...

That is, Databases | <Your Database> | Programmability | Stored Procedures

Paste the results here.

HTH
  David
Hello, I got this issue resolved

Thanks,
Sarika
ASKER CERTIFIED SOLUTION
Avatar of David Todd
David Todd
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial