Combobox with information of several tables

Combobox with information of several tables

Hi there,

I would like to set up a combobox and use attributes from several tables to show. Only then I'm able to chose the right record. I use a Jquery which makes it possible to show several fields in the combobox. However I'm afraid my SQL knowledge isn't that good yet to set up a propper 'inner join' I asume.

Fore more details see the attachment.

Arnold Grippeling
Hi Arnold,

Its hard to explain how to do it without more context so I'm going to mention a few issues I've seen and hope this might help you in the right direction.

Attempt 1: The error says {Kind}.[ZorgverzekeraarId] cannot be bound. This happens because you're selecting attributes from the table Kind and using others in the join but this table is never included in the FROM clause. You must have a join with a table in order to use its fields (e.g INNER JOIN KIND ON ....)

Attempts2-4: You're always getting an error saying that cannot convert value XXX to int. This happens because on the select you when you do for example value1 + ' ' + value2 + ' ' + value3 if one of the values is a number (integer, decimal, etc) sql server will try to sum them mathematically. In order to avoid that you must cast or convert that integer to a text first so the db concatenates them instead of summing them (e.g CAST(value1 as varchar)).

i hope that by overcoming this errors you might be able to achieve your goal.


Thx! That helped.