Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ricapires
Starting Member
7 Posts |
Posted - 2005-04-07 : 11:13:30
|
| Hello :)I would like to know if there is any way i can get the day from a date, but i didnt wanted to use 'DAY' command.I ask this because i needed to have some kind of SQL independent statment that could make this work.Thanks for all the possible help!Ricardo |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-04-07 : 11:16:54
|
how about datepart function?Go with the flow & have fun! Else fight the flow |
 |
|
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2005-04-07 : 11:24:24
|
| If your looking for the Alpha You will need to use select Datename(weekday,Yourfield) from yourtableJimUsers <> Logic |
 |
|
|
ricapires
Starting Member
7 Posts |
Posted - 2005-04-07 : 11:27:20
|
| datepart works, and also the LEFT or RIGTH, but the problem is that i need something more low level, since i would like that the query could also be used in Oracle |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-04-07 : 19:57:39
|
| It sure is arrogant of Oracle not to support Transact-SQL.CODO ERGO SUM |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-04-07 : 23:57:45
|
quote: Originally posted by Michael Valentine Jones It sure is arrogant of Oracle not to support Transact-SQL.CODO ERGO SUM
he he he, how about substring? or just shift between systemsif oracle then....if mssql then....orsave all the commands in one text file for oracle and another file for mssql, your app then references to which system you're using --------------------keeping it simple... |
 |
|
|
ricapires
Starting Member
7 Posts |
Posted - 2005-04-08 : 03:48:57
|
my solution was to shift from solutions like jen said. its a better way, since i havent found any possible way of doing this, on a equal way, in the two systems! :)thanks for all the help |
 |
|
|
|
|
|