File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scalar functions

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Has anyone used scalar functions in JDBC? Examples will be helpful.
 
Joshua Doerring
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use scalar functions to get date information from date fields in a query.
For example I have a table called EMPLOYEE and it has a BIRTHDATE field. If I wanted to split out the month, day, year here's how I'd do that.
SELECT firstname, lastname, MONTH(birthdate), DAY(birthdate), YEAR(birthdate)
FROM employee
WHERE department = "01"
You'd get something like this:
Bob, Smith, 8, 25, 1971
Sam, Thompson, 5, 11, 1966
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic