Forum Discussion

crichards's avatar
crichards
Frequent Visitor
8 years ago

QUERY ODBC data source - only import data WHERE condition is true

have a data source that i need to filter on condition before it is opened, thought that the Advanced Options method using an SQL query would be the best  but havnt had much success yet with the statement.. im a bit of a novice at SQL it appears.

 

ODBC (dsn=NetSuite)

BussinessName Pty Ltd

Administrator

 

table name is MESSAGE

 

wish to open all of MESSAGE where EVENT_ID !=""

 

 

 

 

3 Replies

    • crichards's avatar
      crichards
      Frequent Visitor

      thanks Xiaoxin, i tried your line with no luck, also tried a variation.. still no good

       

      SELECT * FROM Administrator_Schema.MESSAGE WHERE EVENT_ID != ""

       

       

      in the Query Editor, can i change this to filter on EVENT_ID? currently have below.

       

      = Administrator_Schema{[Name="MESSAGE",Kind="Table"]}[Data]

       

      any ideas?

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI crichards,

         

        >>i tried your line with no luck, also tried a variation.. still no good

        I'd like to suggest you to modify formula at datasource side and copy the available query to sql statement box.

         

        >>in the Query Editor, can i change this to filter on EVENT_ID? currently have below.

        I don't think you can direct fitler on that step, it not include filter option.

         

        Regards,

        Xiaoxin Sheng