Is it possible to get country from the address in ...
# suiteql
r
Is it possible to get country from the address in location record in suiteQL, able to get the same in savedSearch and analyticsworkbook. Having trouble with suiteQL
s
I didn't try it, but I'm guessing you need to join with`locationmainaddress`
r
Yes it took me quite long to realize. Was trying to join address at first among other things. I'm not sure where is the documentation is for it in Netsuite. Secondly the locationmainaddress doesn't have id. They have primary keys was trying to join with locationmainaddress.id instead of locationmainaddress.nkey.
s
You can see it on the Records Catalog page
p
select entityaddress.country from location, entityaddress where location.mainaddress = entityaddress.nkey
should work
r
Yeah was able to build it. Didn't know the exact table name and about the nkey. Was using id.