Hi,
Some questions about the SET DATEFIRST-function...
When I do a "SELECT @@DATEFIRST" then I got "7", which is normal and the
standard.
When I open a Blank Query in the Query Analyzer and I do a "SET DATEFIRST
1", and I do afterwarths in the same (!!) Query-window a "SELECT
@@DATEFIRST" I receive "1", which is also normal and expected.
BUT:
When I run after that in another (!!) Query window the "SELECT @@DATEFIRST"
I receive "7".. and not "1" as I expected...
Or when I do a "SET DATEFIRST 1", and after that I close the Query Analyzer
and open a new one and do a "SELECT @@DATEFIRST" I also receive "7"....
So now my question/remark: it seems to me that the "SET DATEFIRST3 function
doesn't really affec the SQL Server, but only the query's that follow. Is
this true or not? For me that's good behaviour, because I don't want to
afect the settigns of my SQL Server, But I need to be sure....
Thansk a lot in advance,
Pieter 2 2117
Yes, SET setting only affects the current connection. Or only the stored procedure or trigger if
executed inside a stored procedure or trigger.
--
Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Hi,
Some questions about the SET DATEFIRST-function...
When I do a "SELECT @@DATEFIRST" then I got "7", which is normal and the standard.
When I open a Blank Query in the Query Analyzer and I do a "SET DATEFIRST 1", and I do afterwarths in the same (!!) Query-window a "SELECT @@DATEFIRST" I receive "1", which is also normal and expected.
BUT:
When I run after that in another (!!) Query window the "SELECT @@DATEFIRST" I receive "7".. and not "1" as I expected...
Or when I do a "SET DATEFIRST 1", and after that I close the Query Analyzer and open a new one and do a "SELECT @@DATEFIRST" I also receive "7"....
So now my question/remark: it seems to me that the "SET DATEFIRST3 function doesn't really affec the SQL Server, but only the query's that follow. Is this true or not? For me that's good behaviour, because I don't want to afect the settigns of my SQL Server, But I need to be sure....
Thansk a lot in advance,
Pieter
Thanks for the quick answer!!
"Tibor Karaszi" <ti***************************@hotmail.nomail.co m> wrote in
message news:Og*************@TK2MSFTNGP11.phx.gbl... Yes, SET setting only affects the current connection. Or only the stored
procedure or trigger if executed inside a stored procedure or trigger.
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"DraguVaso" <pi**********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Hi,
Some questions about the SET DATEFIRST-function...
When I do a "SELECT @@DATEFIRST" then I got "7", which is normal and the standard.
When I open a Blank Query in the Query Analyzer and I do a "SET
DATEFIRST 1", and I do afterwarths in the same (!!) Query-window a "SELECT @@DATEFIRST" I receive "1", which is also normal and expected.
BUT:
When I run after that in another (!!) Query window the "SELECT
@@DATEFIRST" I receive "7".. and not "1" as I expected...
Or when I do a "SET DATEFIRST 1", and after that I close the Query
Analyzer and open a new one and do a "SELECT @@DATEFIRST" I also receive "7"....
So now my question/remark: it seems to me that the "SET DATEFIRST3
function doesn't really affec the SQL Server, but only the query's that follow.
Is this true or not? For me that's good behaviour, because I don't want to afect the settigns of my SQL Server, But I need to be sure....
Thansk a lot in advance,
Pieter
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Troy |
last post by:
My ISP provides me with 2 servers: one for normal web hosting
(non-PHP) and a CGI server (with PHP). I create my website using
fusion 7 and upload this in its entirity to the web hosting server....
|
by: jacob navia |
last post by:
Valid pointers have two states. Either empty (NULL), or filled with an
address that must be at a valid address.
Valid addresses are:
1) The current global context. The first byte of the data...
|
by: chettiar |
last post by:
Hi,
I am trying to migrate SQL Server into DB2. In SQL Server there is code
like:
SET DATEFIRST 6
SELECT DATEPART(WEEK, '2006-01-31')
What could be the equivalent DB2 code for this.
|
by: a |
last post by:
Hi,
I have a pointer that points to an unknown heap memory block, is it possible
to check the pointer + 3 is valid or not?
If it is impossible, how can I do the check?
Thanks
|
by: Andy Dingley |
last post by:
Here's a chunk of a longer piece of punditry I'm working on, re: the
choices between doctypes for authoring and the State of the Union for
validity. I've got a bucketload of nasty code and a bunch...
|
by: Goofy |
last post by:
Hi Everyone,
My scenario is that I am writing and application on a server which host
several ASP.NET applications. In my application I would like to use a
function which relies on a custom...
|
by: shuisheng |
last post by:
Dear All,
Assume I have a class for a cuboid domain. The domain is defined by
the cuboid's lower corner, such as (0, 0, 0), and upper corner, such
as (1, 1, 1). The upper corner should be always...
|
by: xhe |
last post by:
Hi,
I need to program to check the validity of IP address through PHP
Initially I used this one:
$url="http://www.ntc.gov.au/ViewPage.aspx?
page=A02400304500100020";
$fp=fopen($url,"r");...
|
by: istillshine |
last post by:
I have a function foo, shown below. Is it a good idea to test each
argument against my assumption? I think it is safer. However, I
notice that people usually don't test the validity of...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |