Incorrect Syntax near '='

It returns Incorrect Syntax near '='. Point me the mistake I'm making it here or if possible provide a solution to select skills in a drop down select widget in the employee detail screen

For starters, there's a @EmployeeId at the start of the query...

Kilian Hekhuis wrote:

For starters, there's a @EmployeeId at the start of the query...

Yeah I've removed it . Even though it returns the same error


Hi Balaji Vinayagamoorthi,

Your input parameter @EmployeeId should be an EmployeeIdentifier data type instead of text, right? Also without the Expand Inline option.


Samuel M. wrote:

Hi Balaji Vinayagamoorthi,

Your input parameter @EmployeeId should be an EmployeeIdentifier data type instead of text, right? Also without the Expand Inline option.


It shows like this and yep you're correct and what Should I do know?

 


There's also another problem, since this is SQL you need IS NOT NULL to test for a non-empty Id. I see you compare it with "> 0" instead.

Solution

Besides the problem that Kilian Hekhuis mentioned, your output should be the Skills entity in the first place and then the 'Selection' structure. 

Solution

Indeed, I missed that one, thanks Samuel.

Kilian Hekhuis wrote:

There's also another problem, since this is SQL you need IS NOT NULL to test for a non-empty Id. I see you compare it with "> 0" instead.

What I'm trying here is when the skills are selected by an employee it should display the selected values and the non-selected values in order to add or even delete inside that dropdown select widget itself and for new employee it should display all the skill values 

It must be like the image that I've attached with it.

Samuel M. wrote:

Besides the problem that Kilian Hekhuis mentioned, your output should be the Skills entity in the first place and then the 'Selection' structure. 

Oh Okay


Hi Balaji,

I understand that, and it's the right approach, but again, you need "IS NOT NULL" instead of "> 0" to make that work.

Kilian Hekhuis wrote:

Hi Balaji,

I understand that, and it's the right approach, but again, you need "IS NOT NULL" instead of "> 0" to make that work.

Like this

Samuel M. wrote:

Besides the problem that Kilian Hekhuis mentioned, your output should be the Skills entity in the first place and then the 'Selection' structure. 


This one worked

Now I can work on logic of selecting skills in employee detail screen. Thank you everyone and if possible share some ideas for selecting skills from an employee .

Like that. Also note that there's no reason to use an SQL, an Aggregate can be created that does that same job, making it all much easier. Something like this:

Kilian Hekhuis wrote:

Like that. Also note that there's no reason to use an SQL, an Aggregate can be created that does that same job, making it all much easier. Something like this:


I'm getting skills not as static entity . I'm getting the skills in a separate screen.You can see what I'm trying to do in my .oml file

Balaji,

It doesn't matter at all whether it's a Static Entity or not! Just create that Aggregate and be done with it...

Here's the eSpace with the Aggregate in place. Note there's all kinds of errors in your other logic (e.g. in EmployeeDetail/Save, you loop over SQL.List, then in the If you use SQL1.List and in the CreateOrUpdate you use SQLForm.Record!), but I've not tried to correct that.

Kilian Hekhuis wrote:

Here's the eSpace with the Aggregate in place. Note there's all kinds of errors in your other logic (e.g. in EmployeeDetail/Save, you loop over SQL.List, then in the If you use SQL1.List and in the CreateOrUpdate you use SQLForm.Record!), but I've not tried to correct that.


Yeah I'm currently creating it and thanks for your time.

You're most welcome. Happy coding!