Viewing 15 posts - 1,321 through 1,335 (of 5,356 total)
Do you mean as a linked server?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 5, 2005 at 2:13 am
May I ask, why you want to handle this on the server?
I guess most people here, consider this merely a presentational issue that should be handled at the client.

--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 5, 2005 at 2:11 am
The getdate() function will display date and time. For example 1/4/2005 10:40:00.00, so when you run the query with the >= the current day (1/4/05) will be excluded.
Slightly incorrect!
It...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 5, 2005 at 1:53 am
SELECT *
WHERE somedate IS BETWEEN FirstDayPrevMonth AND LastDayLastMonth
Wouldn't any record timestamped after midnight on the last day of the previous month get filtered out?
Yes, they will get filterered out. That's a...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 5, 2005 at 1:26 am
Based on your sample, this should do:
select SSN, Dateborn, DateDied, DATEDIFF(day, CAST(Dateborn AS DATETIME),CAST(DateDied AS DATETIME)) as NO_OF_DAYS from MyTable
where CAST(dateborn AS DATETIME) > CAST(datedied AS DATETIME)
But it looks as though...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 5, 2005 at 12:32 am
Please refrain from multiposting! That makes it hard to follow.
You are aware that this here is SQL Server Land? ![]()
Apart from the link...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 4, 2005 at 1:45 pm
If this 7 is supposed to be dynamic, you might want to do something like
DECLARE @topnum INT
SET @topnum = 7
SET ROWCOUNT @topnum
SELECT FROM
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 4, 2005 at 1:37 pm
In addition to Svetlana, do you have any default values define for Dateborn, DateDied in your table?
Posting the DDL might be a good idea.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 4, 2005 at 1:33 pm
You might also have a look at BOL at "CREATE FUNCTION" and the example ISOWeek given there.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 4, 2005 at 6:32 am
I doubt you'll find a built-in solution for this. I am not aware of any sp that will give what you need. You can however utilize the FileSystemObject via the...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 4, 2005 at 3:39 am
---------------------- |abcd efgh | -- Notice the trailing blanks...
(1 row(s) affected)
Could it be you're mixing some kind of presentational stuff in here, Jeff?
...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 4, 2005 at 1:16 am
A financial accounting system indeed requires a very well-designed database. However, I think most systems here mix the pure OLTP data with presentational stuff. A journal is such a presentational...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 4, 2005 at 1:02 am
Do a search on my site for "Windows XP". Returns 18 links back to the MS knowledgebase. Too much to post here. ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 3, 2005 at 7:57 am
May I say that you're about to compare apples with oranges?
Each table models a single entity which is described by its attributes. An invoice is no offer, a client...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 3, 2005 at 7:43 am
Piggy-backing on AJ, see, if this helps:
http://www.sommarskog.se/error-handling-II.html
http://www.sommarskog.se/error-handling-I.html
![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 3, 2005 at 5:59 am
Viewing 15 posts - 1,321 through 1,335 (of 5,356 total)