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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 DATEFIRST

Author  Topic 

DENIZ3E
Yak Posting Veteran

56 Posts

Posted - 2005-01-14 : 17:47:23
HOW I USE DATEFIRST IN WIEW?

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2005-01-14 : 19:53:32
What do you want to do with it?

create view MyView
as
select @@DateFirst

HTH

=================================================================

Scriptures, n. The sacred books of our holy religion, as distinguished from the false and profane writings on which all other faiths are based.
-Ambrose Bierce, writer (1842-1914) [The Devil's Dictionary]
Go to Top of Page

DENIZ3E
Yak Posting Veteran

56 Posts

Posted - 2005-01-15 : 17:25:00
-----
create view V1
AS
@@DATEFIRST
DATEFIRST 1

SELECT DATEPART(WW,GETDATE())

--------
OK?
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-01-15 : 17:49:01
quote:
Originally posted by DENIZ3E

-----
create view V1
AS
@@DATEFIRST
DATEFIRST 1

SELECT DATEPART(WW,GETDATE())

--------
OK?


No, it's not OK.
Go to Top of Page

DENIZ3E
Yak Posting Veteran

56 Posts

Posted - 2005-01-15 : 18:01:32
PLEASE HELP
HOW I CAN USE
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-01-15 : 19:42:42
You can't. See the syntax in SS help.
Go to Top of Page

DENIZ3E
Yak Posting Veteran

56 Posts

Posted - 2005-01-16 : 08:38:12
CREATE VIEW V1
AS
SELECT DATEPART(WW,GETDATE()),* FROM TABLE
----------------
SET DATEFIRST 6
SELECT * FROM V1

IS OK?
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-01-16 : 09:25:49
quote:
Originally posted by DENIZ3E

SET DATEFIRST 6
SELECT * FROM V1

IS OK?


Yes.
Go to Top of Page

DENIZ3E
Yak Posting Veteran

56 Posts

Posted - 2005-01-16 : 13:34:42
thank you
Go to Top of Page
   

- Advertisement -