Welcome To Snipplr


Everyone's Recent Snippets Tagged sql



More for me than anything else
2 1515 posted 17 years ago by iloveitaly
0 1815 posted 17 years ago by d020
Bind the DropDownList like normal (set DataSourceID, DataTextField, DataValueField), and <%BIND%> the SelectedValue field. AutoPostBack should be enabled. In the OnSelectedIndexChanged:
0 2267 posted 17 years ago by jink
Replace *SERVERNAME* with the name of the server name in the web.config
2 2129 posted 17 years ago by jink
This is an example piece of code that will load a SubSonic collection into the "col1" object. The collection class is told to look for the column "VendorId" in the products table and pull it based based on the matching supplied vendorId.
0 1705 posted 17 years ago by mordecaix7
0 1481 posted 17 years ago by rowntreerob
This sql query will select the past version information about a given file from the database. An example would be searching for %ApprovalHistoryVOImpl% would return all past version numbers (in the database) for the ApprovalHistoryVOImpl.class file....
0 1969 posted 17 years ago by theonlyalterego
* be postgres user
0 1530 posted 17 years ago by kungfoo
Sometimes you want to return a bunch of data from a table, but you want it coming back in a random order. Maybe it's for keeping some content on a home page fresh. Here's how:
0 1685 posted 17 years ago by blackf0rk
0 1779 posted 17 years ago by smoover
Show table size, number of rows, and size of indexes in MySQL.
1 2477 posted 17 years ago by zingo
0 1879 posted 17 years ago by jonniespratley
2 2195 posted 17 years ago by jonniespratley
I am currently still working on this, and will make changes.
1 2042 posted 17 years ago by jonniespratley
select cast(floor(cast(getdate() as float)) as datetime)
0 1890 posted 17 years ago by flurk118
0 1895 posted 17 years ago by eden159
This is by no means the most efficient way to do this, in terms of performance. It is however the easiest way.
1 1958 posted 17 years ago by xtheonex
1 1625 posted 17 years ago by ping_ch
I was having the hardest time getting this to work. It's a collection of various items. For whatever reason, I needed to include the CASE statement due to NULL's coming back. If this helps you out... go for it.
0 1770 posted 17 years ago by gembry
0 1880 posted 17 years ago by jonniespratley
Create a random password using a Dictionary database table. Selects a random word, and then appends two random numbers to the end, creating passwords in the form of: foozling98 or laicism11
1 1829 posted 17 years ago by mynameisharry
0 1321 posted 17 years ago by manec
Just replace TABLENAME.OLD_COLUMNNAME and NEW_COLUMNNAME with your new values.
0 1730 posted 17 years ago by naspinski
2 1953 posted 17 years ago by jtkendall
0 1620 posted 17 years ago by ginoplusio