SQL Language World

Welcome to SQL world on Planet Source Code! This site is one of the Internet's largest online databases of free code! You can search for particular code, simply browse by category, or just peruse! The site is filled with programs, .zip files, examples, snippets, and tutorials so feel free to jump on in!


For all you masochists, here is a list of all the code in the Planet Source Code database for this world, all 81,464. lines of it!!!



SSRS step by step My experiment on SSRS step by step
Oracle D2k - Reports 6i Begineers Oracle Reports 6i Tutorial.
Know metadata sql server Connociendo metadata de sql server Here there is a miscellaneus of querys that let know the structure of the objects and relationships of any BD in SQL Server These querys can be used in another BD that use the INFORMATION_SCHEMA. Aqui se encuentra una miscelania de consultas que permiten conocer la estructura de cualquier objeto y sus relaciones en SQL Server. Estas consultas pueden ser aplicadas a cualquier motor de BD que maneje la BD INFORMATION_SCHEMA VOTE FOR ME!!!! VOTEN POR MI!!!
Dias Laborales Working Days Obtiene los dias laborales entre dos fechas get working days between two dates
Age exactly edad exacta Devuelve la diferencia entre fechas Result the diference between dates
Finding No of Max values To finding no of max values from a table.max function gives only one value, but this procedure gives top max no of values.I have created this procedure in sybase. U can check the procedure using same logic in other databse also
get all row counts This SQL*Plus script spools two files built from the session user's tables: (1) a file of SELECT COUNT(*) FROM statements, and (2) a comma-delimited file of row counts and table names, opened in Notepad.
build a file from similar variable-length strings in a file's records Via this SQL*Plus script, you can isolate and embellish similar strings of varying lengths that appear in a file's records. The script contains a PL/SQL block that utilizes EXECUTE IMMEDIATE, UTL_FILE, and the INSTR built-in.
find minimum or maximum column value This tiny script solicits a user table and column name, and MIN or MAX (group function) at the SQL*Plus prompt, then runs SQL to find the minimum or maximum value in the column, displaying it on the screen.
vary the table name in a Select statement's FROM clause in PL/SQL EXECUTE IMMEDIATE facilitates a variable table name in the FROM clause of a Select statement in PL/SQL. This can be very handy when looking for the same thing across many tables. Here are two example blocks, executed via SQL*Plus.
Remove Extra Lead Characters & Remove Extra Trail Characters These two tiny PL/SQL stored functions return in_string with a repeating leading or trailing character reduced to a single occurrence. These are basically just glorified versions of the LTRIM and RTRIM built-ins.
grant a privilege on all of a session user's tables to a grantee user This script solicits a table privilege and grantee user name at the SQL*Plus prompt, then builds and executes a file of GRANT statements to grant the privilege on all of the session user's tables to the grantee user.
build a file of Insert statements from the delimited fields in a file's records This SQL*Plus script is handy for quickly adding lots of rows to a validation table. The script contains a PL/SQL block that utilizes EXECUTE IMMEDIATE, UTL_FILE, and a PL/SQL parsing function.
An application of Benford's Law using SQL Benford's Law maintains several purposes, one of which is forensic accounting. Condsider the fact that people who make up figures tend to distribute their digits fairly uniformly, a simple comparison of first-digit frequency distribution from the data with the expected distribution according to Benford's law ought to show up any anomalous results. Hence, one could use it as an indicator of fraud relating to accounting and expenses. The example I've submitted is a general overview to accomplish the latter.
Library System This system use a back end of SQL 2000, use to manipulate the Stored Proc in the Database, it helps you a lot, dont forget to rate it tnx,
Have N Days Elapsed 2 This PL/SQL stored function returns Y or N to indicate whether or not a specified number of days (in_days) has elapsed from in_timestamp to the present. With SQL*Plus test script.
Have N Minutes Elapsed This PL/SQL stored function returns Y or N to indicate whether or not a specified number of minutes (in_minutes) has elapsed from in_date_time (as DATE or TIMESTAMP) to the present. With SQL*Plus test scripts.
Does Row Exist Oracle developers commonly use "SELECT COUNT(*) INTO <variable>" in their PL/SQL as an easy way to see whether or not rows exist in a table. But this can be slow. Here's a PL/SQL stored function that takes a different, faster approach.
virtual Magic 8-Ball The virtual Magic 8-Ball SQL*Plus script will answer any yes-or-no question. Just ENTER your question, shake the screen vigorously, and press ENTER. Just like the real thing, but without the icosahedral die suspended in liquid. Mystical.
Split String 3 This PL/SQL stored package has one function that splits the in_string into pieces of in_size size or less, on the whole word, returning the pieces as array elements. With SQL*Plus test script.

Page 1 of 62 found. Entries 1 - 20 of 1237 found

Next 20 entries


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Games | Feedback | Customize | SQL Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright� 1997-2010 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.