FlowFilters with ODBC

ta5ta5 Member Posts: 1,164
Hi

I need some queries in MS-Query from Navision.
This is the code
SELECT G_L_Account.No_, G_L_Account.Name, G_L_Account.Balance_at_Date, G_L_Account.Net_Change, G_L_Account.Budgeted_Amount, G_L_Account.Totaling, G_L_Account.Budget_Filter
FROM G_L_Account G_L_Account
WHERE {pred SetFlowFilter,'Budget_Filter','2007'}

As long as SetFlowFilter is not used, everything works fine. With the current syntax I get this error:
"Error in Predicate ..."

Any ideas? I have found some postings in this forum, but they did not provide a solution.

ODBC 4.01 is used.

Thanks in advance

Thomas

Comments

  • WaldoWaldo Member Posts: 3,412
    What is the required result?
    What product are you exactly using?

    May be you can try something like:
    SELECT G_L_Account.No_, G_L_Account.Name, G_L_Account.Balance_at_Date, G_L_Account.Net_Change, G_L_Account.Budgeted_Amount, G_L_Account.Totaling, G_L_Account.Budget_Filter 
    FROM G_L_Account G_L_Account 
    WHERE (Budget_Filter > '01/01/2007') and (Budget_Filter < '31/12/2007')
    

    Just guessing, I don't know what you're trying to do... :-k

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • ta5ta5 Member Posts: 1,164
    Thanks for your posting.

    I want to set a flowfilter to "Budget Name", so the field "Budgeted Amount" should only show the values from Budgetname 2007. Very easy in Navision but quite strange in ODBC ](*,)

    The "pred SetFlowFilter" thing is from the ODBC Documentation.

    Regards
    Thomas
  • WaldoWaldo Member Posts: 3,412
    Ah, OK, don't know that.

    I would do it with pure SQL Statements. With GROUP BY and SUM stuff, but I must figure this out myself. It's difficult to give you the statement by heart.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • ta5ta5 Member Posts: 1,164
    I'm sure it would be possible with pure sql statement, but then you would have to select the source table of the flow fields to get the result.
    Possible but a bit more complicated.

    Thats why I wanted to use the native feature of the odbc driver...
  • ta5ta5 Member Posts: 1,164
    Any other ideas?
    Thx in advance
    Thomas
Sign In or Register to comment.