Graphics

 View Only
  • 1.  Xpression and SQL queries in datalinqs

    Posted 07-29-2022 13:11
    Trying to create a Sequence for sports via the tutorial video. I can't seem to connect my excel after i type in the "Select *from ________ order by points.
    In the space i typed in Home Team roster (the name of the excel file and Sheet1$ the name of the table. Both entries make the file disappear. My first thought was age of software. We have not updated in a while. GFX Artist on maternity leave can't find out last update but i'm guessing a year+.

    ------------------------------
    mark kundla
    Governors State University
    ------------------------------


  • 2.  RE: Xpression and SQL queries in datalinqs

    Posted 07-29-2022 17:55
    It will disappear if your query is wrong which is the most likely explanation here. 

    I would recommend using tables and not searching entire sheets. You can create tables in your excel file. 
    The query you were writing is essentially, Select ALL from Entire Excel Sheet. 
    It would look something like SELECT * FROM [TABLE NAME HERE] 
    Although I recommend being more precise as that doesn't really gain you anything since you can just select a table inside datalinq anyway. 

    A full query would look something like;
    SELECT [COLUMN NAME HERE]  FROM [TABLE NAME HERE] WHERE [COLUMN YOU WANT TO CHECK NAME HERE] = Value you want to check here.

    An example would be;
    SELECT [FIRST_NAME] FROM [HOME_ROSTER] WHERE [NUM] = %Jersey%
    That would get you the first name from the home roster table where the number colomn equaled the value in the datalinqkey value. 

    It's in % here because its a datalinq key but you could just as easy write 11 eg;
    SELECT [SECOND NAME] FROM [FOOTBALL TABLE] WHERE [JERSEY] = 11





    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 3.  RE: Xpression and SQL queries in datalinqs

    Posted 11-20-2024 16:00

    Is it possible to use Macros in the query example above? I'd like to use Dashboard to feed the table name to the team text object & also the Jersey text object. I think I'm missing something simple. Using @team@ by itself in the table works ok, but I'm trying to figure out how to get datalinq to pull the name based on what jersey we input in Dashboard. FULL NAME and UNI are the column names in excel.

    SELECT [FULL NAME] FROM [@team@] WHERE [UNI] = @Jersey@

    Thanks!

    -Jay



    ------------------------------
    Jay Cofield
    University of Montevallo- Dept of Comm
    ------------------------------



  • 4.  RE: Xpression and SQL queries in datalinqs

    Posted 11-22-2024 12:25

    One thing that you might take a look at is how the data is formatted in Excel vs how it's formatted in your SQL query.

    I believe, without putting quotes around the macro (Such as WHERE [UNI] = '@Jersey@' vs [UNI] = @Jersey@), how you have it currently is going to look for an exact numerical match. However, if you have text you're searching for, or are trying to search with text, there might be a mismatch. There's also some guesswork that the ADODB driver does for Excel documents based on how the columns' data exists, because Excel doesn't store exact data types for each column like a full fledged database would. It uses maybe the first couple of rows to guess what it should be for that column.



    ------------------------------
    Zachary Fradette
    United States
    ------------------------------



  • 5.  RE: Xpression and SQL queries in datalinqs

    Posted 11-22-2024 12:31

    Thanks! I'll take a look at that & make sure the columns are formatted the same.

     

    My plan is to create an excel with our conference's team rosters, and let my student operator click a button in dashboard based on who we're playing. 

     

     

    -Jay Cofield, Ph.D.

    Professor of Mass Communication

    The University of Montevallo

    205-665-6624

    cofieldj@montevallo.edu