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,988. lines of it!!!



Time Taken In Milliseconds To Insert 1000 Records This piece of code checks the number of milliseconds taken to insert say 1000 records in a table. This all happens in computer within a second which we cannot notice and hence I have calculated the time lag in seconds. It speaks for the power or SQL Server 2005 and modern computing technology. Also, 1000 milliseconds = 1 second. You can also know the number of seconds just by replacing the 'millisecond' with 'second' in code. But the process should be big enough to surpass time limit of 1 second.
No Of Seconds Elapsed Since Midnight This piece of code checks the number of seconds elapsed since midnight.We are assuming that today is 31st july 2010 and number of seconds are counted from 00:00:00 of 31st July 2010 midnight.
Difference in 'Days' since last event.txt This piece of code checks the difference in 'number of days' since the last event occured.
Reverse of String The 'Reverse' function reverses the string for you.
Pivot Table Creation in SQL SERVER 2005. Creation of Pivot always makes it easy to read data and make conclusions fast. It is one of strong points of Microsoft Excel Spreadsheet. It is easily understood by everyone and needed frequently in various scenarios. Eveb Sql Server 2005 is capable of creating pivot report.Here I have made a table in SQL SERVER 2005 and presented it's concept in easy to understand way with ample comments wherever needed. Database's compatibility level must be set to 90.
Factorial Calculator. For calculating Factorial.
Current Date/Periods Query of current date and periods
Cursor days of the week This code will cursor through the days of the week and print the day and date each time through
Days Of This Week This query will return the day of the week in one column and the date in another column.
do DML on many tables, from many other similar tables, with minimal coding This write-up with code shows how to do inserts, updates, and deletes on many tables, from many other similar tables, by using a mapping table, a REF cursor, and SQL built around PL/SQL variables. The mapping table makes for tight PL/SQL coding.
First and Last Date of Week (Shorter Code) Get First and Last Date of Week
SQL Introduction The purpose of this tutorial is to introduce the reader to the basics of SQL (pronounced like the word sequel: see-quele). SQL stands for Structured Query Language In this tutorial, we will cover the following aspects of the SQL language: 1. DQL - Data Query Language * SELECT 2. DML - Data Manipulation Language * DELETE * INSERT * UPDATE 3. DDL - Data Definition Language * ALTER INDEX * ALTER TABLE * CREATE INDEX * CREATE TABLE * DROP INDEX * DROP TABLE In addition, this tutorial introduces The objective of the lesson is as follows: * Write an SQL query * Select and list all rows and columns from a table * Select and list selected columns from a table * Select and list columns from multiple tables
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 all user 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.

Page 1 of 63 found. Entries 1 - 20 of 1249 found

Next 20 entries