MySQL:- Cast Integer to String

Background Using MySQL and needing to quickly concatenate numbers and strings. Considered using the cast or the convert operator to "prep" the numbers.   Lab Operator - Cast Operator - Casting Number To Character Syntax Using the cast operator goes something like this:- Casting to the character datatype looks like:- Operator - Cast To Character … Continue reading MySQL:- Cast Integer to String

Bible – Cross Reference – Study – Using “scrollmapper/bible_databases” – Use Data

Background Let us create a Stored Procedure that will identify Cross References for a bible verse. Code Stored Procedure bible.crossReferenceFetch SQL SQL - Invoke Outline Let us fetch cross-references for Philippians 4:13 I can do everything through him who gives me strength. SQL SQL - Output Image Text   # Book Chapter# Verse # Text … Continue reading Bible – Cross Reference – Study – Using “scrollmapper/bible_databases” – Use Data

Bible – Cross Reference – Study – Using “scrollmapper/bible_databases” – Load Data

Background In the last week or two opted to explore the steps it will take to utilize the CrossReference section of the GitHub project "ScrollMapper/bible_databases".   Outline Artifacts Identify Artifact Review Artifact Download Artifact Review Downloaded Artifact Load Data Review SQL Apply SQL Review Changes   Tasks Artifacts Identify Artifacts ScrollMapper is available @ scrollmapper … Continue reading Bible – Cross Reference – Study – Using “scrollmapper/bible_databases” – Load Data

SQL and Bible Studies:- Books in each Genre

Background The Bible is a collection of books. One can categorize the books in so many different ways. In this post, we will use someone else work. He has categorized bible books into genres.   SQL The work avails a couple of database platforms. In this post, we will provide working samples for Transact SQL … Continue reading SQL and Bible Studies:- Books in each Genre

Database Coding – Check for NULLs

Background Saw a code online and quickly knew it was not fully tested.   Preparation Outline Create Sample Table column_identity Create Table SQL Code Stack Overflow How to reset AUTO_INCREMENT in MySQL? Source Source How to reset AUTO_INCREMENT in MySQL? Question Link Answers Kim Stacks Image Code Invoke SQL   Output Output - Image Output … Continue reading Database Coding – Check for NULLs

MySQL – Using “Load Data” Statement

Background Let us load data into our MySQL using it's native "Load Data" statement. Outline Data Source Identify Data Source Review Data Download Data Tools CURL Prepare Target Storage Create Tables Create Staging Table Create Actual Table Load Data Load data into staging table Move data from staging table into actual table Tasks Data Source … Continue reading MySQL – Using “Load Data” Statement

MySQL:- Select / INTO File

Background Wanting to extract data out of MySQL. Chose to use select along with "into outfile".   Outline Preparation Configuration Review Process SQL Review Data Tools cat Tasks Preparation Configuration Configuration - Review Let us review the pertinent MySQL Engine configuration. Outline System Configuration secure_file_priv Folders where File I/O can occur Tasks SQL SQL - … Continue reading MySQL:- Select / INTO File

MySQL:- Select Statement:- Equal Sign and Testing for Equality

  Background Let us touch on the select statement and how we should take care when using it.   Use Select Statement SQL Output Output - Grid Explanation Set @number1 to 5 Set @number2 to 21 Set @answer1 to @number1 SQL:- select @answer1 = @number1 Returned:- null Set @answer2 to @number1 SQL:- select @answer2 := @number1 … Continue reading MySQL:- Select Statement:- Equal Sign and Testing for Equality

MySQL:- Variable – User-Defined Variables and Local Variables

Variables User-Defined Variables To declare user-defined variables, please prefix your variable name with @. User-defined variables are not explicitly defined. Please initialize variable by using set ( set @name='julia' ) or issue ( select @student = 'June Baker' ).   Sample Code   Local Variables Whereas, Local Variables can only be used in stored objects … Continue reading MySQL:- Variable – User-Defined Variables and Local Variables

MySQL:- Stored Procedure – Insert Statement w/o Identity Key

Background Let us create another simple Stored Procedure in MySQL. Unlike our previous try, we will not have the luxury of a system-generated identity key.   Lineage MySQL:- Stored Procedure – Simple Insert Statement w/ Identity Key Link   Code Table department SQL Stored Procedure departmentAddIdAsIdentityNo Outline Sanitize Input Data Department If Department Name is … Continue reading MySQL:- Stored Procedure – Insert Statement w/o Identity Key