Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

select

Use of DATEPART() Function in sql server
Monday, 26 December 2011 23:51
The DATEPART() function is used to return a single part of a date/time, such as year, month, day, hour, minute, etc.

Syntax
DATEPART(datepart,date)

The following SELECT statement:

SELECT DATEPART(yyyy,OrderDate) AS OrderYear,
DATEPART(mm,OrderDate) AS OrderMonth,
DATEPART(dd,OrderDate) AS OrderDay,
FROM Orders
WHERE OrderId=1


OUTPUT
OrderYear OrderMonth OrderDay
2008 11 11

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/QjclBoUKIHc/14349

 
Select Case structure in vb.net
Thursday, 22 December 2011 23:58
Select Case control structure is slightly different from the If....ElseIf control structure . The difference is that the Select Case control structure basically only make decision on one expression or dimension (for example the examination grade) while the If ...ElseIf statement control structure may evaluate only one expression, each If....ElseIf statement may also compute entirely different dimensions. Select Case is preferred when there exist many different conditions because using If...Then..ElseIf statements might become too messy.

The format of the Select Case control structure is show below:


Select Case expression
Case value1
Block of one or more VB statements
Case value2
Block of one or more VB Statements
Case value3
.
Case Else
Block of one or more VB Statements
End Select

Example 1

Select Case grade

Case "A"
result.Caption="High Distinction"

Case "A-"
result.Caption="Distinction"

Case "B"
result.Caption="Credit"

Case "C"
result.Caption="Pass"

Case Else
result.Caption="Fail"

End Select


Example 2

Select Case mark
Case Is >= 85
comment.Caption = "Excellence"
Case Is >= 70
comment.Caption = "Good"
Case Is >= 60
comment.Caption = "Above Average"
Case Is >= 50
comment.Caption = "Average"
Case Else
comment.Caption = "Need to work harder"
End Select


Example 3

Select Case mark
Case 0 to 49
comment.Caption = "Need to work harder"
Case 50 to 59
comment.Caption = "Average"
Case 60 to 69
comment.Caption = "Above Average"
Case 70 to 84
comment.Caption = "Good"
Case Else
comment.Caption = "Excellence"
End Select

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/b4MTL0KskeA/14297

 
Nested queries in Rails
Friday, 22 April 2011 04:24

Entry.where(:id => Entry.select('max(id) id').arel).to_sql

=> "SELECT \"entries\".* FROM \"entries\" WHERE (\"entries\".\"id\" IN (SELECT max(id) id FROM \"entries\"))"

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/Ff5TpJcZ2Mg/13139

 
Amazon's Got Free (Free!) One-Day Shipping On Electronics For the Holidays [Dealz]
Monday, 20 December 2010 10:52
Well this is a nice early stocking stuffer! Now through 11:59pm (PST) on December 22nd, Amazon's giving you free one-day shipping on certain electronics, software, and video games. After you add a qualifying item to your cart, select One-Day Shipping at checkout and they'll apply the discount. The deal also applies to select jewelry, movies, musical instruments, and more, but be sure to double-check that your order qualifies here. For last-minute shoppers like, I dunno, all of us? The checkout line at Amazon's way shorter than the ones at Montgomery Mall. [Amazon] More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/M-pbtoJB370/amazons-got-free-free-one+day-shipping-on-electronics-for-the-holidays

 
Is Android an Ugly Platform? [Android]
Friday, 19 November 2010 23:00
The path to Android for a "very successful iOS game development shop" might be "skipping the Android Market entirely" in favor of deals to be bundled on select handsets, according to John Gruber. Is the Android ecosystem that ugly? More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/aYlkwDMSBx8/is-android-an-ugly-platform

 


Taxonomy by Zaragoza Online