SQL Hacks

Whether you're running Access, MySQL, SQL Server, Oracle, or PostgreSQL, this book will help you push the limits of traditional SQL to squeeze data effectively from your database. The book offers 100 hacks -- unique tips and tools -- that bring you the knowledge of experts who apply what they...

Descripción completa

Detalles Bibliográficos
Autor principal: Cumming, Andrew (-)
Otros Autores: Russell, Gordon
Formato: Libro electrónico
Idioma:Inglés
Publicado: Sebastopol : O'Reilly Media 2009.
Edición:1st ed
Colección:Hacks series
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627197306719
Tabla de Contenidos:
  • SQL Hacks; Contributors; Acknowledgments; Preface; How to Use This Book; How This Book Is Organized; Conventions; Using Code Examples; How to Contact Us; Got a Hack?; Safari Enabled; 1. SQL Fundamentals; Switches; Microsoft SQL Server; Oracle; List your tables in Oracle; Import a file of SQL into Oracle; MySQL; List your tables in MySQL; Import a file of SQL into MySQL; Access; Import a file of SQL commands; PostgreSQL; List your tables in Postgres; Import a file into PostgreSQL; DB2; Connect to SQL from a Program; Other C# considerations; Java; Perl; PHP; Ruby; Perform Conditional INSERTs
  • INSERT ... SELECTUPDATE the Database; Solve a Crossword Puzzle Using SQL; Access Variation; PostgreSQL Variation; Filling a Table with Words; Don't Perform the Same Calculation Over and Over; Hacking the Hack; 2. Joins, Unions, and Views; Alter the Table; Create a View to Replace a Table; Filter Rows and Columns; Java; Ruby; C#; PHP; Filter on Indexed Columns; Convert Subqueries to JOINs; Convert Aggregate Subqueries to JOINs; Simplify Complicated Updates; Using a VIEW; Choose the Right Join Style for Your Relationships; A JOIN Star; Generate Combinations; 3. Text Handling; PostgreSQL
  • SQL ServerOracle; Search for a String Across Columns; Solve Anagrams; A quadratic hash function; An exponential hash function; Sort Your Email; Oracle: extract the domain name; Extract the Top-Level Domain; SQL Server: extract the top-level domain; Oracle: extract the top-level domain; PostgreSQL: extract the top-level domain; Hacking the Hack; Oracle: calculated index; PostgreSQL: calculated index; 4. Date Handling; Parse Dates with Oracle; Parse Dates with MySQL; Parse Dates with SQL Server; Uncover Trends in Your Data; SQL Server; Access; Oracle; Report on Any Date Criteria; Current Month
  • OracleYear-to-Date Totals; Generate Quarterly Reports; Second Tuesday of the Month; The Formula; Oracle; SQL Server; PostgreSQL; Hacking the Hack: The Last Thursday of the Month; See Also; 5. Number Crunching; Keep a Running Total; MySQL; Oracle; See Also; Include the Rows Your JOIN Forgot; Identify Overlapping Ranges; Avoid Dividing by Zero; Other Ways to COUNT; Calculate the Maximum of Two Fields; Alternative Functions; Hacking the Hack; Disaggregate a COUNT; Cope with Rounding Errors; Get Values and Subtotals in One Shot; Oracle and DB2; Hacking the Hack; Calculate the Median
  • Fill the Temporary TableSQL Server; Oracle; Find the Middle Row or Rows; Tally Results into a Chart; Calculate the Distance Between GPS Locations; Reconcile Invoices and Remittances; Invoice Numbers Do Not Match; Find Possible Matches; Find Transposition Errors; Oracle; Single Query; Apply a Progressive Tax; Calculate Rank; 6. Online Applications; The Input Document; gross.xsl; Running the Hack; Hacking the Hack; Present Data Graphically Using SVG; Oracle; MySQL; Add Navigation Features to Web Applications; Oracle; Access; Running the Hack; Hacking the Hack
  • Tunnel into MySQL from Microsoft Access