Welcome To Snipplr
Everyone's Recent SQL Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
use this SQL query to find out an applications full name (aka long name) and/or application id based on the application short name. This can obviously be re-written to perform the reverse.
0
765
posted 12 years ago by theonlyalterego
This is a simple SQL statement which will update all the posts within a Wordpress installation changing the domain which files were uploaded to.
Very handy if migrating a site from a test to live environment and all embedded images are referenced...
0
552
posted 12 years ago by suibhne
sometimes we botch an import, and end up with return or newline characters in the field. So fields which should be empty have \r in them, or fields with text data have an invisible trailing newline. This makes it impossible to match the text values....
0
450
posted 12 years ago by powerthru
To sort varchar fields which contain numeric data & returning XML
0
353
posted 12 years ago by aunlead
Solucion a error cuando mudamos una bd de una pc a otra y luego no podemos crear un diagrama de la BD
2
609
posted 12 years ago by derebus
Here is the SQL code to print a row of from any table. All you have to do is modify the @tableName and @whereClause variables. Works only in MS SQL 2005+
1
3972
posted 12 years ago by niaher
Declaramos tantas variables como campos vaya a devolver la select que nos estamos currando para el cursor, en este ejemplo con dos campos vamos contentos:
* declare @campo1 int
* declare @campo2 int
Ahora declaramos el cursor, al cual...
0
500
posted 12 years ago by derebus
You would use a CURSOR FOR Loop when you want to fetch and process every record in a cursor. The CURSOR FOR Loop will terminate when all of the records in the cursor have been fetched.
1
457
posted 12 years ago by mprabhuram