This content has been marked as final. Show 3 replies
A vlookup is called a "join" in SQL.
Before you jump too far into Apex, you really should learn the basics of SQL. With the technology we have today, there is no reason you can't find an adequate tutorial on the web.
select table.col1, table2.col1 from table, table2 where table.id = table2.id
Thanks for the advice, point well taken. I have played with joins in the query builder alot, but I was never getting the results that I needed, so I started typing out queries in SQL commands. I am on my 3rd app in Apex and could use a little further advice if you don't mind. There are two columns COUNTRY and ROLETITLE that need to match to pull over the SALARY data in the join. The SALARY data exists in the PRICE_ROLE table, and I have a SALARY column in the PRICE_MODEL_BLANK table.
From what I understand about joins, aren't you actually moving columns or joining columns from one table to another? But what I am trying to do is to get the data from the SALARY column in PRICE_ROLE into the PRICE_MODEL_BLANK SALARY column whenever the country and roletitle matchup. Is this a different type of join then, like an inner join or not a join at all and something else?
With all due respect, and please don't take this the wrong way, you are not going to get very far at all in APEX without knowing at least some basic SQL. True, you can use the query builder, single table data manipulation forms etc, however you'll find very quickly that you will hit a brick wall. Plus without knowing what is actually going on, you will find that your applications are likely to be inefficient, don't extend and scale very well, and are extremely difficult to debug.
The best thing you could do is go online and find a few Oracle SQL tutorials to work through.