Showing posts with label projec. Show all posts
Showing posts with label projec. Show all posts

Friday, March 23, 2012

QUERY

QUERY
select enddate EDT
NEW_TIME(ENDDATE, 'EDT','PDT'
FROM PROJEC
ERROR
Server: Msg 195, Level 15, State 10, Line
'NEW_TIME' is not a recognized function nameRMSANDS (whoever you are)
You are posting many functions that are not defined in SQL-Server. You
are probably converting code from a different RDBMS.
You should really explain what each function is supposed to do. In
addition to that, it wouldn't hurt to take a look at the SQL-Server
Books Online (a download link has been posted by Ray Higdon) to see what
functions SQL-Server does support.
Gert-Jan
RMSANDS wrote:
> QUERY:
> select enddate EDT,
> NEW_TIME(ENDDATE, 'EDT','PDT')
> FROM PROJECT
> ERROR:
> Server: Msg 195, Level 15, State 10, Line 2
> 'NEW_TIME' is not a recognized function name.
--
(Please reply only to the newsgroup)

QUERY

Using sql 2000 here is my table, query, and error
Table
create table projec
(task varchar(14) not null
startdate datetime
enddate datetime)
Query
SELECT TASK "TASKS_SHORTER_THAN_ONE_MONTH
FROM PROJEC
WHERE ADD_MONTHS (STARTDATE,1) > ENDDATE
Error
Server: Msg 195, Level 15, State 10, Line
'ADD_MONTHS' is not a recognized function nameI think you want this
SELECT TASK as 'TASKS_SHORTER_THAN_ONE_MONTH'
FROM PROJECT
WHERE datediff(m,STARTDATE, ENDDATE) < 1
of if you wanted days use
WHERE datediff(dd,STARTDATE, ENDDATE) < 30
Download BOL, it will help immensely -
http://www.microsoft.com/downloads/details.aspx?FamilyID=a6f79cb1-a420-445f-8a4b-bd77a7da194b&DisplayLang=en
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"RMSANDS" <anonymous@.discussions.microsoft.com> wrote in message
news:48E0A71C-7E83-47D6-8838-C4271F0EB6B8@.microsoft.com...
> Using sql 2000 here is my table, query, and error.
> Table:
> create table project
> (task varchar(14) not null,
> startdate datetime,
> enddate datetime);
>
> Query:
> SELECT TASK "TASKS_SHORTER_THAN_ONE_MONTH"
> FROM PROJECT
> WHERE ADD_MONTHS (STARTDATE,1) > ENDDATE;
> Error:
> Server: Msg 195, Level 15, State 10, Line 3
> 'ADD_MONTHS' is not a recognized function name.
>