MapInfo SQL String Functions

Slides:



Advertisements
Similar presentations
N.G.Acharya & D.K.Marathe college Chembur-E, Mumbai-71
Advertisements

Manipulating Strings String Functions. VB provides a large number of functions that facilitate working with strings. These are found in Microsoft.VisualBasic.Strings.
1. Write an Excel text function in cell Company Data!A4, which may be copied down, to string together the first and last name with only the first letter.
Computer Science & Engineering 2111 Text Functions 1CSE 2111 Lecture-Text Functions.
MIS: Chapter 14 Cumulative concepts, features and functions, plus new functions COUNTIFS, SUMIFS, AVERAGEIFS (Separate ppt on REACH.louisville.edu) All.
Slide 1 VB Programming Fundamentals. Slide 2 Visual Basic Language v VB language is powerful and easy to use v Descendent of BASIC (Beginner's All-Purpose.
CS1100: Computer Science and Its Applications Text Processing Created By Martin Schedlbauer
There is a String type in VB Data TypePrefix Stringstr Dim strFirstName As String strFirstName = “Homer” strFirstName = “” String A String variable can.
Strings in Visual Basic Words, Phrases, and Spaces.
Introduction to Oracle9i: SQL1 Selected Single-Row Functions.
On to… string operations & functions. Concatenation (&) §When we want to combine two character strings into one new (longer) string, we can concatenate.
Lecture 6 29/1/15. Number functions Number functions take numbers as input, change them, and output the results as numbers. 2.
SQL Use of Functions Character functions Please use speaker notes for additional information!
BACS 287 Visual Basic String Manipulation. BACS 287 Visual Basic Strings In Visual Basic, a “string” is a series of text, numbers, and special characters.
Chapter 9 Creating Formulas that Manipulate Text Microsoft Office Excel 2003.
DAY 6: MICROSOFT EXCEL – CHAPTER 2 CONTD. MICROSOFT EXCEL – CHAPTER 3 Akhila Kondai September 04, 2013.
Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,
Chapter 10 Selected Single-Row Functions Oracle 10g: SQL.
Chapter 5 Selected Single-Row Functions. Chapter Objectives  Use the UPPER, LOWER, and INITCAP functions to change the case of field values and character.
Characters The data type char represents a single character in Java. –Character values are written as a symbol: ‘a’, ‘)’, ‘%’, ‘A’, etc. –A char value.
Oracle 11g: SQL Chapter 10 Selected Single-Row Functions.
Manipulating Strings. What is a string? Data composed of text characters. The data is stored in consecutive bytes of memory. Each byte stores the ASCII.
Chapter 3 Selected Single-Row Functions and Advanced DML & DDL.
Instructor: Craig Duckett Lecture 08: Thursday, October 22 nd, 2015 Patterns, Order of Evaluation, Concatenation, Substrings, Trim, Position 1 BIT275:
Chapter 12: String Manipulation Introduction to Programming with C++ Fourth Edition.
Lecture 8 – SQL Joins – assemble new views from existing tables INNER JOIN’s The Cartesian Product Theta Joins and Equi-joins Self Joins Natural Join.
More Strings CS303E: Elements of Computers and Programming.
ACIS Introduction to Data Analytics & Business Intelligence Text Mining Data Cleaning.
SQL Functions. SQL functions are built into Oracle Database and are available for use in various appropriate SQL statements. These functions are use full.
H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide. USA - +1-(770) ,
1 Session 6: Database Best Practice iNET Academy Open Source Web Development.
Processing Text Excel can not only be used to process numbers, but also text. This often involves taking apart (parsing) or putting together text values.
CECS 5020 Computers in Education Visual Basic Variables and Constants.
1 CSE 2337 Chapter 7 Organizing Data. 2 Overview Import unstructured data Concatenation Parse Create Excel Lists.
1 Inside Module 8 Extracting Data Page n Using the Extract command2 n Coercion3 n $-functions4 n Extract from a table7.
Strings PART I STRINGS, DATES, AND TIMES. FUNDAMENTALS OF CHARATERS AND STRINGS VB represents characters using American National Standards Institute(ANSI)
1 VB-06-String Manipulation Mar 03, 2002 String Function VISUAL BASIC.
CSC 162 Visual Basic I Programming. String Functions LTrim( string ) –Removes leading spaces from the left side of string RTrim( string ) –Removes trailing.
MapInfo Redistricting Window Rob Tozier 14 th Annual GeoElections User Conference
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Quiz 3 this week – last section on Friday. Assignment 4 is posted. Data mining: –Designing functions.
13/06/ Strings Left, Right and Trim. 213/06/2016 Learning Objectives Explain what the Left, Right and Trim functions do.
Lesson 4 String Manipulation. Lesson 4 In many applications you will need to do some kind of manipulation or parsing of strings, whether you are Attempting.
Lesson 3: Using Formulas
Microsoft Visual Basic 2008: Reloaded Third Edition
10th Annual GeoElections User’s Conference
Logical Functions Excel Lesson 10.
String Methods Programming Guides.
Rob Gleasure robgleasure.com
Miscellaneous Excel Combining Excel and Access.
Open Source Server Side Scripting MySQL Functions
Chapter 10 Selected Single-Row Functions Oracle 10g: SQL
Single Table Queries in SQL
CS 3630 Database Design and Implementation
Winter 2018 CISC101 11/16/2018 CISC101 Reminders
SQL Text Manipulation Farrokh Alemi, Ph.D.
Chapter 6 Variables What is VBScript?
Rob Gleasure robgleasure.com
11th Annual GeoElections User’s Conference
Sub Procedures and Functions
Microsoft Excel Chapters 2 &3
VBScript Session 10.
Topic 6 Lesson 1 – Text Processing
String Processing 1 MIS 3406 Department of MIS Fox School of Business
18th Annual GeoElections Conference
Inside Module 8 Extracting Data Page Using the Extract command 2
10th Annual GeoElections Conference
Lecture 5 SQL FUNCTIONS.
Trainer: Bach Ngoc Toan– TEDU Website:
10th Annual GeoElections Conference
Introduction to SQL Server and the Structure Query Language
Presentation transcript:

MapInfo SQL String Functions Hello good day my name is Rob Tozier and I will be speaking to you about MapInfo SQL String Functions. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions InStr( num , str1 , str2 ) Proper$( str ) Len( str ) Left$( str , num ) Str$( obj ) Right$( str , num ) Val( str ) Mid$( str,num1, num2 ) LCase$( str ) LTrim$( str ) UCase$( str  ) RTrim$( str ) The following are a list of SQL String Functions within MapInfo that are most commonly used. When using these functions you are typically performing one of 3 actions, Update Column, Table Maintenance, and/or SQL Query. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions Arguments Found in MapInfo SQL Functions: Str – is a string of text, which can be a table column or a value that is located in the column. Num – is an number, which is commonly referring to a character position on a line of text. OBJ – is an object, used when selecting an object. Such as point, a line or a polyline. When using the SQL String Functions there are arguments that are required in order to run the functions. I will demonstrate how they are used later. The first one is a string(STR). A Str is a line of text that can either be a table column name or a value that falls in one of the rows within the column. The second is a Number(Num). A Num usually is referring to a character position on a within a line of text. The third is an object(OBJ). An OBJ is an object within a map such as a point, line, and/or polyline. In some instances you may want to query out just points in a map that has a mix of points and lines and polylines. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions InStr( num , str1 , str2 ) When string contains a substring, InStr returns the character position where substring starts. Note: When string does not contain substring, InStr returns zero. The Instring(InStr) function is used to select a str of text within a column. For example if you had a list of addresses containing North Main Street and the way it was entered into your VR 2 different ways. One being spelled out as North and the other being abbreviated with the letter N. You could use the InStr() to select out all Main Streets and fix the ones where they were abbreviated. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions Len( str ) Returns the number of characters in a str. The length function is used to determine the length of a string, which can be useful when adjusting field lengths in table maintenance. It can also be useful when combined with other functions to determine position. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions Val( str ) Returns the numeric value of the str. The column you are update with the Val must be an integer and it will only be updated with numerics that are in the beginning of the address. for example, If you wanted to update a column with just the address number you can parse out the address number from an address using val(Address). 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions LCase$( str ) Returns an lowercase (all capitalized) version of str. The Lower Case (LCase$(Str)) function will lowercase all the text in a column. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions UCase$( str ) Returns an uppercase (all capitalized) version of str. The Upper Case (UCase$(Str)) function will Uppercase all the text in a column. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions Proper$( str ) Returns a str with proper capitalization (first letter of each word capitalized). The Proper (Proper$(Str)) function will capitalize the first letter of all the text in a column. So if you have 2 words in a cell that falls within the column it will capitalize both not just the first word like how the upper case function would. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions Left$( str , num ) Returns the num specified of characters starting on the left of the str. The Left(left$) is usually used with an update column. When you are trying to take part of a string starting on the left hand side and it returns a specified amount of characters. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions Right$( str , num ) Returns the num specified of characters starting on the right of the str. The Right(Right$) is usually used with an update column. When you are trying to take part of a string starting on the right hand side and it returns a specified amount of characters. 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions Mid$( str,num1, num2 ) Returns a portion of the str starting at character position num1 and extending for position num2 characters. The Mid(mid$) is usually used with an update column. When you are trying to take part of a string starting in the middle and it returns a specified amount of characters. Mid$(City_State_Zip, InStr(1,City_State_Zip,",")+1,InStr(InStr(1,City_State_Zip,",")+1, City_State_Zip,",")-1) Alternatively I could have done it an easier way using. Mid$(City_State_Zip, InStr(1,City_State_Zip,",")+1, Val(City_State_Zip)-5) 17th Annual GeoElections Conference www.icwmaps.com

17th Annual GeoElections Conference MapInfo SQL String Functions LTrim$( str ) Trims any spaces from the start of str and returns result. RTrim$( str ) Trims any spaces from the end of str and returns result. The left (LTrim$) and right (RTrim$) trim function are used when trying to remove spaces before and after a string in a specified column. This is usually preformed when you import data from an external source. 17th Annual GeoElections Conference www.icwmaps.com

15th Annual GeoElections Conference MapInfo SQL String Functions 15th Annual GeoElections Conference www.icwmaps.com