431
Views
3
Comments
Solved
Unable to execute procedure Using Advanced SQL
Question

Hi,

I have a procedure in sql and i am calling it using Advanced SQL Like -

/* %LogicalDatabase%=GetLogicalDatabase({prj_hrs}) */

Select {prj_hrs}.* from {prj_hrs}

EXEC @return_value =  [prjdb].[dbo].[UpDate_EmployeeHours_Status]
    @emp_id,
    @wk_end_dt,
    @updt_id,
    @status


Input variables types - 

emp_id = Text

wk_end_dt = DateTime

updt_id = user identifiers

status = integer 

When i am calling it, i am getting bellow error.

"Error in Advanced query ApproveTimesheet.the string was not recognized as a valid datetime. there is an unknown word starting at index 0"


Thanks

Jitendra

2021-01-29 14-18-24
Jitendra Raghuvanshi
Solution

Issue Resolved 

Thanks to Abílio Matos for replay

UserImage.jpg
Abilio Matos

Jitendra,

The error says what is the problem. Your wk_end_it is in string format and cannot be converted to datetime. You need to check the value you are passing to it and if the datatype is correct.


Abílio Matos

2021-01-29 14-18-24
Jitendra Raghuvanshi

Hi Abilio,

Thanks For reply

value data type is date time.


Jitendra

2021-01-29 14-18-24
Jitendra Raghuvanshi
Solution

Issue Resolved 

Thanks to Abílio Matos for replay

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.