This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PhraseOMatic { | |
public static void main (String[] args) { | |
String[] wordListOne = { | |
"24/7", | |
"multi-Tier", | |
"30,000 foot", | |
"B-to-B", | |
"win-win", | |
"front-end", | |
"web-based", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the text to search, in cell A1: | |
Andy Is Awesome | |
Use the =FIND function to get the index of the first space: | |
=FIND(<text to search for>, <text to search in>, <index to start at>) | |
=FIND(" ", A1) | |
Returns 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT salesagent, SUM(saleamount) as salestotal | |
FROM sales.salestable | |
GROUP BY salesagent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN TRANSACTION | |
--Declare variable to hold max primary key value | |
DECLARE @priKey int = | |
(SELECT MAX(PK) | |
FROM normalSales) + 1 | |
--INSERT values into table | |
INSERT INTO normalSales(PK, saleDate, saleAmount, city, saleQuantity, saleTotal) | |
VALUES ( | |
@priKey, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT salesTable.saleDate, salesTable.saleAmount, 'Reno' AS city, salesTable.reno AS saleQuantity | |
FROM salesTable | |
WHERE salesTable.reno > 0 | |
UNION | |
SELECT salesTable.saleDate, salesTable.saleAmount, 'Salt Lake City' AS city, salesTable.saltLakeCity AS saleQuantity | |
FROM salesTable | |
WHERE salesTable.saltLakeCity > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUBSTRING(address, 1, 4) AS houseNumber, SUBSTRING(address, 6, 2) AS cardinalDirection, SUBSTRING(address, 7, (LEN(address)-6)) AS streetAddress | |
FROM contactList |