LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  dynamic fields - DB select query

    Employee
    Posted 06-07-2016 07:23

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dcoll

    Hello everybody!

    I have this situation in which I hope you could help me with.

    I have a huge database, with around 60 fields. From this database, I want to use a select query, but I still don't know which fields I want to bring.

    I will use an excel file, with a column called: "FieldName". In this column, for a set of countries, any value from those 60 fields within the database can be added.

    For example:

    France Telephone
    UK Address
    Spain E-mail


    How can I use that kind of query?

    It should be something like:

    "Select x from My_DataBase" (being x= "Telephone,Address,E-mail")


    Can it be done?

    Thank you in advance!


  • 2.  RE: dynamic fields - DB select query

    Employee
    Posted 06-07-2016 11:54

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    How about creating the command with BRAINScript and then using the DB Execute node to execute the SQL command your logic has created? Very simple example attached.
    Attachments:
    sql_command.brg


  • 3.  RE: dynamic fields - DB select query

    Employee
    Posted 06-08-2016 02:13

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dcoll

    Thanks a lot for your quick reply!