Forum Discussion

saivina2920's avatar
saivina2920
Icon for Post Prodigy rankPost Prodigy
2 years ago
Solved

How to call stored procedure along with parameter in M Code

I am struggling to call stored procedure along with parameter in M Code .

below is my table :

StudentIDStudentNameMarksDOJ
1Jame's10012/28/2023 10:02
2Steave Smith20012/28/2023 11:32
3Waugh30012/28/2023 9:02
4Waugh40012/28/2023 13:32
5Smith60012/28/2023 14:02

 

My stored procedure like below.

 

EXEC MyStoredProc "TimeParam"1 

 

Example, "TimeParam1" ==> values like (06:00 AM,07:00 AM,....12:00PM) slicer fliter

 

When i pass the value like "10:00 AM" (TimeParam1), it should return all below 10:00 AM records on the condition with "DOJ" column

 

how to do this using stored procedure along with parameter in M Code.

 

I want this solution in stored procedure only.

 

pls. help.

 

i want to pass time as parameter from DOJ column through stored procedure. 

 

For example,

if i pass time "10:00" it should show till 10:00 AM records

if i pass time "11:00" it should show till 11:00 AM records

How to do this..