Welcome To Snipplr
Everyone's Recent Snippets Tagged sql
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Re-seed identity table if rows were deleted/there are gaps in numerical order
2
453
posted 14 years ago by CDIDevs
Call it in the button click event after in(de)crementing CurrentPage value
0
460
posted 14 years ago by tomaszsimon
Using SQL you can have your database return the distance between 2 sets of Lat and Long points, and using some math functions also take into account the curvature of the earth.
3
946
posted 14 years ago by zingo
A Temp table is great for combining multiple SELECT statements in a Sproc and outputting as just one table.
Don't forget to Drop the table after the SELECT * FROM #TempTableName at the end.
2
921
posted 14 years ago by highlyevolved
These statements convert a date/time field into just a date or a time field
2
736
posted 14 years ago by highlyevolved
Delete All Foreign Keys in a database;
(make sure you USE keyword)
2
538
posted 14 years ago by marcocs
This snippet is usable for telephone number normalization. It supports re-mapping of misused alphabetical characters (e.g. i for 1) and some other clean up stuff... Take a look.
Update, 2009-10-02: added function to create a corresponding MySQL RE...
1
696
posted 14 years ago by dreadwarrior
I am forever forgetting this. Have to look up the 101 vs 103 in books online every time.
Also forget which way around is US/NZ format. :-)
1
764
posted 14 years ago by rengber
From StackOverflow. I'm still not quite happy with my understanding of it, but it looks an order of magnitude more elegant than most I've found.
0
693
posted 14 years ago by rengber
Pretty straight forward implementation of mysql instantiation using php5 oop. Example usage at the bottom. The database in the example is named 'example_database' and has 1 table, 'newstable'. This table has three columns: 'id,heading,message'.
By...
0
506
posted 14 years ago by bakkelun