sql server programming:
SELECT getdater() is the date at the server, not the workstation. Why do you think it's the workstation? -- HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com [quoted text, click to view] "John Baima" <john@nospam.com> wrote in message news:hq9i019il11g4ub9u57gaalpeqn7kh2ktv@4ax.com... > Is there a way to return the system date of the SQL Server? If I use > > SELECT GETDATE() as Today > > that returns the date of the client workstation. I would like to know > if that date is more than a day before or after the date on the > server. Is there a way to get that date?? > > -John >
[quoted text, click to view] > Is there a way to return the system date of the SQL Server? If I use > > SELECT GETDATE() as Today > > that returns the date of the client workstation. I would like to know
Not really, It returns the date from the server where sql server is installed. AMB [quoted text, click to view] "John Baima" wrote: > Is there a way to return the system date of the SQL Server? If I use > > SELECT GETDATE() as Today > > that returns the date of the client workstation. I would like to know > if that date is more than a day before or after the date on the > server. Is there a way to get that date?? > > -John >
Is the SQL server you're connected to installed on your workstation? select serverproperty('MachineName') [quoted text, click to view] "Aaron [SQL Server MVP]" wrote: > > SELECT GETDATE() as Today > > > > that returns the date of the client workstation. > > If you execute it against an active connection to the server, that returns > the date of the server. > > -- > http://www.aspfaq.com/ > (Reverse address to reply.) > >
John, Are you connecting to an instance installed in your PC?, if so, then your pc is the server an the workstation. AMB [quoted text, click to view] "John Baima" wrote: > "Alejandro Mesa" <AlejandroMesa@discussions.microsoft.com> wrote: > > >> Is there a way to return the system date of the SQL Server? If I use > >> > >> SELECT GETDATE() as Today > >> > >> that returns the date of the client workstation. I would like to know > > > >Not really, It returns the date from the server where sql server is installed. > > > > > > Try > > SELECT GETDATE() as Today > > in Query Analyzer. I ran it once, looked at the results. Changed my > system date, ran it again and observed. If you can do this and it does > not change, I would be interested to know. Did you really try this or > are you just reading the docs??? > > -John
[quoted text, click to view] > Did you really try this or > are you just reading the docs???
No. Kalen *writes* the docs! -- David Portas SQL Server MVP --
He was grascious enough to admit he was wrong and apologize. In my book, that puts him a few notches above quite a few visitors to these forums!! [quoted text, click to view] "Aaron [SQL Server MVP]" wrote: > > >My apologies. Really. I thought that I was connected to the company > > >SQL Server, but I was actually connected to my local SQL Server! It's > > >hard doing good work when being retarded. Sorry! > > > > It always hurts when you get nasty with the people who are helping you out > > and it turns out you were wrong :) > > Yeah, why do you think I took a month off from these groups? > >
After flaming everyone, (including Kalen,) he admits: [quoted text, click to view] >My apologies. Really. I thought that I was connected to the company >SQL Server, but I was actually connected to my local SQL Server! It's >hard doing good work when being retarded. Sorry!
It always hurts when you get nasty with the people who are helping you out and it turns out you were wrong :) -- ---------------------------------------------------------------------------- Louis Davidson - drsql@hotmail.com SQL Server MVP Compass Technology Management - www.compass.net Pro SQL Server 2000 Database Design - http://www.apress.com/book/bookDisplay.html?bID=266 Blog - http://spaces.msn.com/members/drsql/ Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies may be ignored :) [quoted text, click to view] "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message news:OyyDqTSGFHA.2180@TK2MSFTNGP12.phx.gbl... >> Please explain, I'm not sure what you mean. > > Well, when you opened Query Analyzer, what server did you connect to? > >> Did you really try this or >> are you just reading the docs??? > > Please stop repeating this silly question. > >
:) -- ---------------------------------------------------------------------------- Louis Davidson - drsql@hotmail.com SQL Server MVP Compass Technology Management - www.compass.net Pro SQL Server 2000 Database Design - http://www.apress.com/book/bookDisplay.html?bID=266 Blog - http://spaces.msn.com/members/drsql/ Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies may be ignored :) [quoted text, click to view] "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message news:et93JfSGFHA.1936@TK2MSFTNGP14.phx.gbl... >> >My apologies. Really. I thought that I was connected to the company >> >SQL Server, but I was actually connected to my local SQL Server! It's >> >hard doing good work when being retarded. Sorry! >> >> It always hurts when you get nasty with the people who are helping you >> out >> and it turns out you were wrong :) > > Yeah, why do you think I took a month off from these groups? > >
[quoted text, click to view] > SELECT GETDATE() as Today > > that returns the date of the client workstation.
If you execute it against an active connection to the server, that returns the date of the server. -- http://www.aspfaq.com/ (Reverse address to reply.)
[quoted text, click to view] > Try > > SELECT GETDATE() as Today > > in Query Analyzer. I ran it once, looked at the results. Changed my > system date, ran it again and observed.
And what server/workstation is Query Analyzer's active connection? [quoted text, click to view] > Did you really try this or > are you just reading the docs???
Please, the people answering your question have been using SQL Server for years. -- http://www.aspfaq.com/ (Reverse address to reply.)
[quoted text, click to view] > Please explain, I'm not sure what you mean.
Well, when you opened Query Analyzer, what server did you connect to? [quoted text, click to view] > Did you really try this or > are you just reading the docs???
Please stop repeating this silly question.
[quoted text, click to view] > >My apologies. Really. I thought that I was connected to the company > >SQL Server, but I was actually connected to my local SQL Server! It's > >hard doing good work when being retarded. Sorry! > > It always hurts when you get nasty with the people who are helping you out > and it turns out you were wrong :)
Yeah, why do you think I took a month off from these groups?
[quoted text, click to view] > As long as John got the right answer in the end that's what's most important > right?
If he had said it once, I probably would have just ignored it. Unfortunately, he repeated the same ignorant question to everyone trying to help him. To me, that's a little more than obstinate. YMMV. A
OUCH... Are you running SQL Server locally? -- David G.
This is the fastest moving thread I've seen in a long time. Everyone, get back to work... -- David Gugick Imceda Software www.imceda.com
Is there a way to return the system date of the SQL Server? If I use SELECT GETDATE() as Today that returns the date of the client workstation. I would like to know if that date is more than a day before or after the date on the server. Is there a way to get that date?? -John
[quoted text, click to view] "Kalen Delaney" <replies@public_newsgroups.com> wrote: >SELECT getdater() is the date at the server, not the workstation. Why do you >think it's the workstation?
Well, because I actually tried SELECT GETDATE() as Today in Query Analyzer. Ran it once, looked at the results. Changed my system date, ran it again and observed. If you can do this and it does not change, I would be interested to know. Did you really try this or are you just reading the docs???
[quoted text, click to view] "Alejandro Mesa" <AlejandroMesa@discussions.microsoft.com> wrote: >> Is there a way to return the system date of the SQL Server? If I use >> >> SELECT GETDATE() as Today >> >> that returns the date of the client workstation. I would like to know > >Not really, It returns the date from the server where sql server is installed. > >
Try SELECT GETDATE() as Today in Query Analyzer. I ran it once, looked at the results. Changed my system date, ran it again and observed. If you can do this and it does not change, I would be interested to know. Did you really try this or are you just reading the docs???
[quoted text, click to view] "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote: >> SELECT GETDATE() as Today >> >> that returns the date of the client workstation. > >If you execute it against an active connection to the server, that returns >the date of the server.
Please explain, I'm not sure what you mean. I actually tried SELECT GETDATE() as Today in Query Analyzer. Ran it once, looked at the results. Changed my system date, ran it again and observed. If you can do this and it does not change, I would be interested to know. Did you really try this or are you just reading the docs???
[quoted text, click to view] "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote: >> Try >> >> SELECT GETDATE() as Today >> >> in Query Analyzer. I ran it once, looked at the results. Changed my >> system date, ran it again and observed. > >And what server/workstation is Query Analyzer's active connection? > >> Did you really try this or >> are you just reading the docs??? > >Please, the people answering your question have been using SQL Server for >years.
My apologies. Really. I thought that I was connected to the company SQL Server, but I was actually connected to my local SQL Server! It's hard doing good work when being retarded. Sorry!
I don't think he was necassarily being nasty....maybe slightly obstinate! As long as John got the right answer in the end that's what's most important right? Regards Jamie Thomson An SSIS blog - http://blogs.conchango.com/jamiethomson/category/71.aspx [quoted text, click to view] "Louis Davidson" <dr_dontspamme_sql@hotmail.com> wrote in message news:OEoScaSGFHA.624@TK2MSFTNGP15.phx.gbl... > After flaming everyone, (including Kalen,) he admits: > >>My apologies. Really. I thought that I was connected to the company >>SQL Server, but I was actually connected to my local SQL Server! It's >>hard doing good work when being retarded. Sorry! > > It always hurts when you get nasty with the people who are helping you out > and it turns out you were wrong :) > > -- > ---------------------------------------------------------------------------- > Louis Davidson - drsql@hotmail.com > SQL Server MVP > > Compass Technology Management - www.compass.net > Pro SQL Server 2000 Database Design - > http://www.apress.com/book/bookDisplay.html?bID=266 > Blog - http://spaces.msn.com/members/drsql/ > Note: Please reply to the newsgroups only unless you are interested in > consulting services. All other replies may be ignored :) > "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message > news:OyyDqTSGFHA.2180@TK2MSFTNGP12.phx.gbl... >>> Please explain, I'm not sure what you mean. >> >> Well, when you opened Query Analyzer, what server did you connect to? >> >>> Did you really try this or >>> are you just reading the docs??? >> >> Please stop repeating this silly question. >> >> > >
Thanks, Andy. Before I realized that several of you had jumped in on my behalf, I was ready to reply that I had learned everything I know not by reading the docs, but by reading "Inside SQL Server", and then give an URL to the book. :-) -- HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com [quoted text, click to view] "Andy Williams" <f_u_b_a_r_1_1_1_9@y_a_h_o_o_._c_o_m> wrote in message news:eYNHZXSGFHA.2180@TK2MSFTNGP10.phx.gbl... >> are you just reading the docs??? > > I think she knows what she's talking about: > > http://tinyurl.com/48pdh >
And I used the term YMMV when responding to you. ;-) --=20 HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com [quoted text, click to view] "Mike Hodgson" <mike.hodgson@mallesons.nospam.com> wrote in message = news:uehYrvfGFHA.1740@TK2MSFTNGP09.phx.gbl...
Aaron, sorry for asking a dumb question but I've seen you sign off = "YMMV" a couple times now but can't figure out what it means. = Translation? (At least when I flame Kalen I do it tongue-in-cheek (xref: PAE VS SQL = Server AWE, in microsoft.public.sqlserver.server, Feb 18 2005). :-P ) -- mike hodgson | database administrator | mallesons stephen jaques T +61 (2) 9296 3668 | F +61 (2) 9296 3885 | M +61 (408) 675 907 E mailto:mike.hodgson@mallesons.nospam.com | W = http://www.mallesons.com=20 Aaron [SQL Server MVP] wrote:=20 As long as John got the right answer in the end that's what's most important right? =20 If he had said it once, I probably would have just ignored it. Unfortunately, he repeated the same ignorant question to everyone trying = to help him. To me, that's a little more than obstinate. YMMV.
LOL... You have to admit, cutting and pasting the same flame three times in the same thread is not a very good way to earn points around here. ;) [quoted text, click to view] "Kalen Delaney" <replies@public_newsgroups.com> wrote in message news:eBZElffGFHA.2616@tk2msftngp13.phx.gbl... > Thanks, Andy. > Before I realized that several of you had jumped in on my behalf, I was > ready to reply that I had learned everything I know not by reading the > docs, but by reading "Inside SQL Server", and then give an URL to the > book. > :-) > > -- > HTH > ---------------- > Kalen Delaney > SQL Server MVP > www.SolidQualityLearning.com > > > "Andy Williams" <f_u_b_a_r_1_1_1_9@y_a_h_o_o_._c_o_m> wrote in message > news:eYNHZXSGFHA.2180@TK2MSFTNGP10.phx.gbl... >>> are you just reading the docs??? >> >> I think she knows what she's talking about: >> >> http://tinyurl.com/48pdh >> > >
Aaron, sorry for asking a dumb question but I've seen you sign off "YMMV" a couple times now but can't figure out what it means. Translation? (At least when I flame Kalen I do it tongue-in-cheek (xref: PAE VS SQL Server AWE, in microsoft.public.sqlserver.server, Feb 18 2005). :-P ) -- *mike hodgson* |/ database administrator/ | mallesons stephen jaques *T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907 *E* mailto:mike.hodgson@mallesons.nospam.com |* W* http://www.mallesons.com [quoted text, click to view] Aaron [SQL Server MVP] wrote: >>As long as John got the right answer in the end that's what's most >> >> >important > > >>right? >> >> > >If he had said it once, I probably would have just ignored it. > >Unfortunately, he repeated the same ignorant question to everyone trying to >help him. To me, that's a little more than obstinate. YMMV. > >A > > >
Ah...it's an American thing. ;-) [quoted text, click to view] Anith Sen wrote: >>>Aaron, sorry for asking a dumb question but I've seen you sign off "YMMV" >>>a couple times now but can't figure out what it means. Translation? >>> >>> > >Your Mileage May Vary > http://dictionary.reference.com/search?q=YMMV > >
Don't see what you're looking for? Try a search.
|