Okay
  Public Ticket #1954017
Bug in TableCreation Column Name
Closed

Comments

  •  2
    A3igner started the conversation

    In my SQL database i have a table with Column names 

    Columname1.VI

    Columname2.VI

    When i add these columns and create a table the last .VI gets dropped and it cannot find the data in the mySQL database of course. This is a bug!

    See Screenshot before and after creating table.

  •  2,572
    Aleksandar replied

    Hello again A3igner.

    Yes, I see. I tried it locally, and it is doing the same thing on our end. This is because the dot ( . ) is a delimiter that usually represents a new column, and it is trying to search for columns within the existing column.

    Like mentioned in our documentation:

    Please note that MySQL query constructor is not an ‘ultimate generator’, it should be treated as helper for constructing a suggestion of a query, by trying to ‘guess’ what you want. We are constantly working to improve it, but SQL is such a complicated and flexible language that fully automating the process for constructing queries is hardly possible. Consequently, the more complicated your request is, the higher is the probability that it will not return exactly what you need. Play around with the resulting query to achieve better results.

    So, with this in mind, you can modify the query it generates, and add the ".VI" to the columns that contain it, and the table will be generated successfully (see attachment).

    Or, you can simply generate your own query by creating the table using the first option (Create a table linked to an existing data source):

    SELECT LScore2_VI.`tradedate`,
           LScore2_VI.`ANDR.VI`,
           LScore2_VI.`BWO.VI`,
           LScore2_VI.`CWI.VI`,
           LScore2_VI.`CAI.VI`,
           LScore2_VI.`EBS.VI`
    FROM LScore2_VI

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    A3igner replied

    why does it work in SQL then?

    In SQL the Column Name is already in this format. All the Plugin is doing is importing it. So it shouldn’t manipulate the column heading!

    This is a bug for sure!!!

    Please fix your bug.

  •  2,572
    Aleksandar replied

    Well, A3igner, it is working in our plugin as well if you pass the IDs correctly.

    The thing is that you're using the SQL Query Constructor, and I must repeat:

    MySQL query constructor is not an ‘ultimate generator’, it should be treated as helper for constructing a suggestion of a query, by trying to ‘guess’ what you want. We are constantly working to improve it, but SQL is such a complicated and flexible language that fully automating the process for constructing queries is hardly possible. 

    It trying to guess what you want is what's causing the error - it's guessing that a second delimiter is actually a column within a column - that's why it's reporting that it has no values - it's looking for something that's not actually there.

    I agree that it shouldn't manipulate the column heading, and I will forward this to our development team, so they can work on a fix for some of the future releases.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    A3igner replied

    yes exactly. 

    In the meantime I will work with the add * query as you correctly mentioned!