Forum Discussion

stega's avatar
stega
Contributor
12 years ago

SQL Query problem

Hi All,

I need some help with my SQL query.

I have this query:

Qry.SQL = "SELECT * FROM [Customers] AS u INNER JOIN [Securities_WebClient] AS mb ON u.sorszam=mb.sorszam ";



And i want to get the mb.ID but i get an error:

Field 'mb.ID' not found



This is where i want to get the value:

id = Qry.FieldByName("mb.ID").Value;



Can somebody help me solving this problem?

Thanks.

2 Replies

  • TAHbKA's avatar
    TAHbKA
    Occasional Contributor
    When you run the querry in your sql editor (not testcomplete) - does the field `mb.ID' appear?
  • Yes it appears, but i solved it with this:

    SELECT *, mb.ID AS azon FROM [Customers] AS u INNER JOIN [Securities_WebClient] AS mb ON u.sorszam=mb.sorszam;