Has anyone had luck querying budgets? I’m looking...
# suiteql
j
Has anyone had luck querying budgets? I’m looking to pull uploaded budget numbers by period.
m
are you just looking for the right tables to pull from?
j
Thanks Mark. When I run select * FROM Budgets I get a “Total” column that represents the total for the entire year. - I want to break it down by month. I imaging I’d have to dig into something like budgetsMachine but not sure that is the correct thinking.
m
I haven't done this before, but it looks like you are right that you'd need to join with
budgetsmachine
(to get budget by accounting period) or
budgetsmachinenoaccountingperiod
(to get budget by month). Have you tried something like:
SELECT * from budgets, budgetsmachine WHERE budgets.id=budgetsmachine.budget
👍 1
j
Yep - just need to knock the rust off of my SQL mindset. This is what looks like it will work…`SELECT * from budgets, budgetsmachine WHERE budgets.id=budgetsmachine.budget AND ( RowNum <= 100 )`
My next obstacle is pulling a GL Impacting Custom Segment into the results. It looks like NetSuite assigned the custseg_n490_* where “_n490_” seems arbitrary and thus the field may be troublesome to access