48
Views
11
Comments
Solved
how to pass email in advanced sql as test value and in where clause
Application Type
Reactive

Hello all,

I'm trying to write an update query which as 2 values as input - ShowroomId and CollaboratorEmail.
But when I'm trying to pass it as test value or in where clause it returns me error.

1. Passed in where clause (i've commented the update query to see if select query returns a record. But it didn't)

2. As Test input with double quotes


Regards,

Aman

Solution

Hello @Dorine Boudry @RAHULY @YASHPAL @Parveen Khan ,

Thank you for your help.

Unfortunately, I had issues with my development environment and its services. But the same was working in testing (UAT) environment. I had raised a support ticket. Solution was to restart services of environment. After that, everything worked perfectly. I don't know what was the cause of the issue but it worked after restarting the services for my development environment.

I had raised another question for this though. you can read the solution I received from the global support here.


Thanks again for your suggestions.

Thanks & Regards,

Aman Devrath

In the first screenprint with the literal value : use single quote instead of double.

In second screenprint, hard to tell, it doesn't look wrong at first glance.  Please show query and why is input showroomid with warning ?

Hello @Dorine Boudry ,

The warning is because ShowroomId is of Showroom Identifier type, and I'm passing test value as integer.
Below is the query with Email set as Email data type, and ShowroomId set as Showroom Identifier data type.

Regards,

Aman

I'm not entirely sure that is correct syntax, never done this, would it make a difference if you would do an inner join from showroommember to collaborator ?  Would it make a difference if you woud alias showroommember ?

Other than that, i don't think your set or your where clauses are wrong, what is data type of IsAvailable ?

on a different note, I think it is odd for you to need to use an email of a related table as identifying attribute to know what rows to update, can you not let your user choose a specific collaborator in the ui, and that use that id without having to make the join during the update ?

Hi @Dorine Boudry ,

1. I tried changing the sql, but had the same error.
    I didn't try with single quotes so I will try it for the first error.

2. IsAvailable is Boolean type.

3. Actually, The final list has only the email from where I'm getting the "invalid" emails and the using it in sql. I'll change the code and try to use only IDs.


I'll get back to you soon.


Thanks & Regards,

Aman Devrath

Hello Aman,

There is two way to resolve this error. You can change the data type of email parameter into text instead of email. or you can set the expend inline of the email parameter to YES. and then try to run.

Hope it resolves your error.

Please let me know if you need any help.

Thanks & regard

Parveen

neither of these 2 proposals are necessary, or would solve anything for him. email is ok as a data type for that input, it will work, and there is no need to do expand inline here

@Parveen Khan I tried with Text data type, it didn't work. I didn't check with Expand Inline. I'll try.

Hi Aman

For the first screenshot. please use 'email' (single quote) on the test input values inside the sql query. because it doesn't work with the "" (double quotes).

Second query (i didn't totally hit the idea) but you can remove the email type and make it as text type for the email input.


I hope this will help.

@YASHPAL I tried with Text data type, it didn't work. it still gave me the same error.

Thanks.

Hi @Aman Devrath

For the first point, please follow @Dorine Boudry 's advice. For the second, can you try passing 0 ({ShowRoomMember}.[IsAvailable] = 0) for IsAvailable attribute ?

Thanks

Rahul Yadav

Solution

Hello @Dorine Boudry @RAHULY @YASHPAL @Parveen Khan ,

Thank you for your help.

Unfortunately, I had issues with my development environment and its services. But the same was working in testing (UAT) environment. I had raised a support ticket. Solution was to restart services of environment. After that, everything worked perfectly. I don't know what was the cause of the issue but it worked after restarting the services for my development environment.

I had raised another question for this though. you can read the solution I received from the global support here.


Thanks again for your suggestions.

Thanks & Regards,

Aman Devrath

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