Dynamic SQL Field Type.

Slides:



Advertisements
Similar presentations
List & Combo Box The University of California Berkeley Extension Copyright © 2012 Patrick McDermott.
Advertisements

Database management system (DBMS)  a DBMS allows users and other software to store and retrieve data in a structured way  controls the organization,
Quick-and-dirty.  Commands end in a semi-colon ◦ If you forget, another prompt line shows up  Either continue the command or…  End it with a semi-colon.
Databases and modelling 3. day. 2 Agenda Introduction to SQL Status on database implementation Forms Exercises Reports.
Lecture Access – Tables. What are Tables? Records Fields.
CSC 2720 Building Web Applications Database and SQL.
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
SQLite Database. SQLite Public domain database – Advantages Small (about 150 KB) – Used on devices with limited resources Each database contained within.
MySQL Dr. Hsiang-Fu Yu National Taipei University of Education
Advanced Web 2012 Lecture 4 Sean Costain PHP Sean Costain 2012 What is PHP? PHP is a widely-used general-purpose scripting language that is especially.
Chapter 2 Basic SQL SELECT Statements
Chapter 10 Queries and Updating Part C. SQL Copyright 2005 Radian Publishing Co.
FIX Repository based Products Infrastructure for the infrastructure Presenter Kevin Houstoun.
REDCap at UVM Presented by Diantha Howard, CCTS Biomedical Informatics September 2011.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
10/31/2012ISC239 Isabelle Bichindaritz1 SQL Graphical Queries Design Query By Example.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
ITBIS373 Database Development
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 7 PL/SQL Packages.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
MySQL Databases & PHP Integration Using PHP to write data to, and retrieve data from, a MySQL database.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Implementing the Theory dBase Operations in MS Access.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Intro to MySQL 1. Open a browser and enter the following address: It should lead to a log in screen. If your name is.
Views Lesson 7.
Chapter 13 Subqueries and Views Part C. SQL Copyright 2005 Radian Publishing Co.
© 2002 by Prentice Hall 1 Database Processing with Microsoft Access David M. Kroenke Database Concepts 1e Appendix A.
Intro to SQL Management Studio. Please Be Sure!! Make sure that your access is read only. If it isn’t, you have the potential to change data within your.
26 Mar 04 1 Application Software Practical 5/6 MS Access.
Database Processing with Microsoft Access Appendix DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
What’s a database? Data stored in a structured format that lends itself to easy manipulation and recall.
1 DBS201: More on SQL Lecture 3. 2 Agenda How to use SQL to update table definitions How to update data in a table How to join tables together.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Forms 5.02 Understand database queries, forms, and reports.
School of Geography FACULTY OF ENVIRONMENT Querying with ArcGIS.
1 MS Access. 2 Database – collection of related data Relational Database Management System (RDBMS) – software that uses related data stored in different.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
JDBC CS 260 Database Systems. Overview  Introduction  JDBC driver types  Eclipse project setup  Programming with JDBC  Prepared statements  SQL.
Android - SQLite Database 12/10/2015. Introduction SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with.
Higher Computing Science Coding the Web: HTML, JavaScript, PHP and MySQL.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
1 DBS201: More on SQL Lecture 2. 2 Agenda Select command review How to create a table How to insert data into a table.
Today You will become familiar with the Appleworks software. You will create your own ‘fields’ and ‘records.’ In the actually program!!!!
Copyright Ó Oracle Corporation, All rights reserved. 77 Creating LOVs and Editors.
SQL Definition: Structured Query Language An industry-standard language for creating, updating and, querying relational database management systems.relational.
MySQL Tutorial. Databases A database is a container that groups together a series of tables within a single structure Each database can contain 1 or more.
Using Structured Query Language (SQL) NCCS Applications –MS Access queries (“show SQL”) –SAS (PROC SQL) –MySQL (the new dataserver) –Visual Foxpro Other.
Oracle9i Developer: PL/SQL Programming Chapter 6 PL/SQL Packages.
DAY 20: ACCESS CHAPTERS 5, 6, 7 Larry Reaves October 28,
Query Methods Simple SQL Statements Start ….
CS320 Web and Internet Programming SQL and MySQL
Databases and Information Management
Access queries p.meade.
Workbench Data Definition Language (DDL)
PHP and MySQL.
Chapter 13 Subqueries and Views
مقدمة في قواعد البيانات
Developing a Model-View-Controller Component for Joomla Part 3
Databases and Information Management
CS3220 Web and Internet Programming SQL and MySQL
5.02 Understand database queries, forms, and reports.
Chapter 9 Query-by-Example Pearson Education © 2009.
CS3220 Web and Internet Programming SQL and MySQL
DATABASE Purpose of database
Dynamic SQL Konstantin Osipov, MySQL AB.
Using SQL with Access I create a database named
Presentation transcript:

Dynamic SQL Field Type

Dynamic SQL Field Type Create using the Online Designer or Data Dictionary Populates a drop-down list of choices by querying the REDCap tables using SELECT queries only. The database table being queried must exist in the same MySQL database as the REDCap tables. ONLY REDCap Super Users may add/modify this field type. Advantage of this field type is that it allows you to populate a drop-down from a dynamic source (i.e. a database table) rather than a static When constructing the query itself, only 1 or 2 fields may be used in the query. If only one field exists in the SQL statement, the values retrieved from the query will serve as both the values AND the displayed text for the drop-down that is populated. If two fields are queried, the first field serves as the unseen values of the drop-down list while the second field gets displayed as the visible text inside the drop-down as seen by the user.

Example 1 Queries Project (ID #1264) for the contents of the Provider field and creates a dropdown list in the current project. SELECT record, value FROM redcap_data WHERE project_id = 1264 AND field_name = ‘faculty’ ORDER BY value;

Example 2 Queries Project (ID=1264) and concatenates Record ID, faculty name and credentials) to create a drop down list in the current project: SELECT a.record, CONCAT_WS(' | ', max(if(a.field_name = 'record_id', a.value,NULL)), max(if(a.field_name = ‘faculty', a.value, NULL)), max(if(a.field_name = ‘credentials', a.value, NULL))) as value FROM redcap_data a WHERE a.project_id=1264 ORDER BY a.record;