Error Doing SQL Queries

Error Doing SQL Queries

  

After adding the SQL of GetAvailableRoom, some errors appeared, such as, "invalid SQL unknown NumberOfAdults parameter in GetAvailableRoom".

I noticed there are no parameters for the SQL, as shown below. Do I hae to add the parameters manually? Or can I drag and drop from the Booking entity's attributes in the Data perspective? Thanks!

You can do it both ways.

I guess drag and drop is from Data perspective. But (I don't know) how to drag and drop? Thanks!

If you don't know how to drag and drop add manually. Right button and add the parameters/entities.


Victor

How to fetch the lowest value from an SQL QUERY?

While doing the room detail screen,how to get the cheapest room  available?

DIVYA VIJAYAN wrote:

How to fetch the lowest value from an SQL QUERY?

While doing the room detail screen,how to get the cheapest room  available?


You can use the SQL Function MIN()

Examples here: https://www.w3schools.com/sql/sql_min_max.asp

Try to add the parameter manually, right clik on the parameters folder and add Query parameters. that should solve your issue.