Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Workstation date
Hi all!

Is there any function in SQL that I can use to get current date from
workstation? All functions which I tried (now(), getdate() etc.)
returns current date from server but I need date from workstation.

Regards,

Mirnes Lemes


Report this thread to moderator Post Follow-up to this message
Old Post
lemes_m@yahoo.com
02-01-06 01:23 AM


Re: Workstation date
lemes_m@yahoo.com  wrote:
> Hi all!
>
> Is there any function in SQL that I can use to get current date from
> workstation? All functions which I tried (now(), getdate() etc.)
> returns current date from server but I need date from workstation.
>
> Regards,
>
> Mirnes Lemes

You'll have to pass the date in as a parameter from the client end.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--


Report this thread to moderator Post Follow-up to this message
Old Post
David Portas
02-01-06 01:23 AM


Re: Workstation date
Thanks for your response.

First, I have to notice that I use MS Access 2003 as Front-End.

I was affraid that passing date is only way because I constructed other
stored procedures to use view to get some data. In this view I used <=
{ fn NOW() } to limit results and after that I joined all other stored
procedures to this view.

Now I got two problems: I tried to create function which uses @SomeDate
parameter to limit results but I can't get it work.

Another problem is how to pass @SomeDate value when I execute stored
procedure which is joined with this function...

Regards,


Report this thread to moderator Post Follow-up to this message
Old Post
lemes_m@yahoo.com
02-01-06 01:23 AM


Re: Workstation date
lemes_m@yahoo.com (lemes_m@yahoo.com)  writes:
> First, I have to notice that I use MS Access 2003 as Front-End.

I will have to notice that I don't know Access.

> Now I got two problems: I tried to create function which uses @SomeDate
> parameter to limit results but I can't get it work.

CREATE FUNCTION someorders (@somedate datetime) RETURNS TABLE AS
RETURN (SELECT OrderID, CustomerID
FROM   Northwind.dbo.Orders
WHERE  OrderDate >= @somedate)
go
select * from someorders ('19980101')

> Another problem is how to pass @SomeDate value when I execute stored
> procedure which is joined with this function...

Join a procedure with a function?

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
02-01-06 01:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 05:42 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006