This file contains hidden or 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
-- A basic JOINS SQL statement resembling VLOOKUP | |
SELECT s.student_id, | |
z.state AS "STATE" | |
FROM STUDENT.STUDENT s | |
JOIN student.zipcode z ON s.zip=z.zip | |
ORDER BY s.STUDENT_ID; |
This file contains hidden or 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 'drop table '||table_name||' cascade constraints;' FROM user_tables; |
This file contains hidden or 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
CONNECT ap/ap; | |
SET SERVEROUTPUT ON | |
declare | |
min_invoice_total ap.invoices.invoice_total%TYPE; | |
max_invoice_total ap.invoices.invoice_total%TYPE; | |
begin | |
SELECT MIN(invoice_total), MAX(invoice_total) INTO min_invoice_total,max_invoice_total | |
FROM ap.invoices; | |
DBMS_OUTPUT.put_line(REGEXP_REPLACE('The minimum invoice total is' || to_char(min_invoice_total, '$999,999.00') || ' while the maximum output total is ' || to_char(max_invoice_total, '$999,999.00') || '.', ' +', ' ')); | |
end; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="icon" href="BucephalusDev-Favicon.png"> |
This file contains hidden or 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
/* | |
Usage: | |
Adding this script to your doc: | |
- Tools > Script Manager > New | |
- Select "Blank Project", then paste this code in and save. | |
Running the script: | |
- Tools > Script Manager | |
- Select "ConvertToMarkdown" function. | |
- Click Run button. | |
- Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]...". |
This file contains hidden or 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
ALTER SESSION | |
SET NLS_NUMERIC_CHARACTERS='. '; | |
SELECT 'Not a quadratic equation.' AS "Answer 1", '0' AS "Answer 2" | |
FROM dual | |
WHERE &&A = 0 | |
UNION | |
SELECT 'x = ' || to_char(-&&B/2/&A) AS "Answer 1", '0' AS "Answer 2" | |
FROM dual | |
WHERE &A != 0 |
This file contains hidden or 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 * FROM ( | |
SELECT student_id, | |
salutation, | |
CASE | |
WHEN salutation IN('Dr.') THEN 'Doctor' | |
END AS NewSalutation | |
FROM student.student | |
) | |
WHERE NewSalutation IS NOT NULL; |
This file contains hidden or 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 CONCAT(CONCAT(CONCAT(CONCAT(city, ' '),STATE),' '),zip) AS "All together with Concat" | |
FROM student.zipcode; |
This file contains hidden or 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 invoice_id, | |
invoice_number | |
FROM ap.invoices | |
WHERE REGEXP_LIKE (invoice_number, '^P(*)'); |
This file contains hidden or 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
//Member social | |
function member_social($atts, $content = null) | |
{ | |
extract(shortcode_atts(array("twitter" => "", "facebook" => "", "github" => "", "linkedin" => ""), $atts)); | |
$html = "\n".'<nav class="team-social text-center"> | |
<a target="_blank" href="http://twitter.com/'.$twitter.'"><img title="Twitter" alt="renova" src="'.get_stylesheet_directory_uri().'/images/social/cool/round/twitter.png"></a> | |
<a target="_blank" href="http://facebook.com/'.$facebook.'"><img title="Facebook" alt="renova" src="'.get_stylesheet_directory_uri().'/images/social/cool//round/facebook.png"></a> | |
<a target="_blank" href="http://linkedin.com/in/'.$linkedin.'"><img title="LinkedIn" alt="renova" src="'.get_stylesheet_directory_uri().'/images/social/cool//round/linkedin.png"></a> | |
<a target="_blank" href="http://github.com/'.$github.'"><img title="GitHub" alt="renova" src="'.get_stylesheet_directory_uri().'/images/social/cool//round/github |