How Do I Specify a Wildcard Character with the SQL Toolkit?Primary Software: LabVIEW Toolkits>>Enterprise Connectivity ToolsetPrimary Software Version: 3.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: If I am doing a database search and want to look for records with names beginning with a certain character(s), how do I specify that wildcard character? Solution: The way to specify a wildcard character is through a % sign and not a * sign. You also need to add a LIKE command to the SQL statement. For example, to look for records in a table where the employees first name is either dan or dany or daniel or danny, you would pass the following SQL statement:SELECT * FROM Employees WHERE FirstName LIKE 'Da%'Notice the use of LIKE and the importance of the single quotes around the string. Also notice the use of the * after the SELECT statement. The * is used as a wildcard to select all columns of the table (in that case, that is the appropriate wildcard specifier). This is a feature of the SQL language.Note: National Instruments has replaced the LabVIEW SQL Toolkit with the LabVIEW Database Connectivity Toolset. The LabVIEW Database Connectivity Toolset offers many new features and extended capabilities such as connectivity to most popular databases through Microsoft ADO technology, complete SQL Functionality, and the ability to save records in XML format. The LabVIEW Database Connectivity Toolset is sold separately or in the LabVIEW Enterprise Connectivity Toolset along with the LabVIEW Statistical Process Toolkit and the LabVIEW Internet Developers Toolkit. Related Links: LabVIEW Database Connectivity Toolset - Products and Services LabVIEW Enterprise Connectivity Toolset - Products and Services SQL Toolkit for G Reference Manual Attachments:
Report Date: 05/12/1998 Last Updated: 03/25/2006 Document ID: 19BCRI0W |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
