Viewing 15 posts - 1,996 through 2,010 (of 5,356 total)
Here are some other solutions. FWIW:
DECLARE @geburtstag DATETIME
SET @geburtstag = '19830908'
SELECT
DATEDIFF(yy, @geburtstag, GETDATE()) -
CASE
WHEN (MONTH(GETDATE()) * 100 +
DAY(GETDATE())) <
(MONTH(@geburtstag)* 100 + DAY(@geburtstag))
THEN 1 ELSE 0
END
SELECT
(CAST(CONVERT(CHAR(8),GETDATE(), 112)...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
September 8, 2004 at 5:14 am
Can it be you have a problem with normalization? ![]()
Now you come up with such a string. One of the most referenced article regarding...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
September 8, 2004 at 3:10 am
Neither Noel's solution nor the one I posted are dynamic.
What is it that you're really after?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
September 3, 2004 at 7:03 am
Always my last resorts are .../ Stored Procs
Interesting typo ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 31, 2004 at 8:41 am
What about some classics ?
http://mindprod.com/unmain.html
http://www.galisteo.com/gallant/humor/klingon1.htm
![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 31, 2004 at 7:23 am
Back in the old days when we used stone knives and bear skins we didn't have these fancy schmancy text editors ad IDE's that color coded syntax.
The programmer actually...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 31, 2004 at 6:37 am
While I'm with Noel on the obvious state of your data, I disagree with his solution. A cross join can be a performance killer when it come to larger datasets;...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 31, 2004 at 6:09 am
Did I ever mention that I really hate this autoreplacement with this annoying smilies
![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 31, 2004 at 1:31 am
It's been mentioned quite a few times, that UDF's are executed for each and every row. Here's the proof of concept:
USE northwind
GO
CREATE VIEW foolview
AS
SELECT
GETDATE() AS Jetzt
GO
CREATE FUNCTION fool_me()
RETURNS...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 31, 2004 at 1:30 am
That's a _very_ broad question!
You might want to read up both terms in BOL as a starter and come back with question that will certainly arise from reading BOL.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 30, 2004 at 6:39 am
http://www.sommarskog.se/dyn-search.html
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 30, 2004 at 5:23 am
To get the last day of a month one can use something like this
SELECT
DATEADD(DAY, -DAY(GETDATE()), CAST(CONVERT(CHAR(8), GETDATE(), 112) AS DATETIME))
AS Monatsultimo
However, using integer operations should be faster:
SELECT DATEADD(d,DATEDIFF(d,DAY(GETDATE()),GETDATE()),0) AS...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 30, 2004 at 5:20 am
You should post some input data along with what it should represent. That might be more descriptive.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 27, 2004 at 6:40 am
This is more of a workaround than an true solution. SQL Server evaluates 1.0 as a non money datatype (FLOAT or DECIMAL).
Here's a script by SQL Server MVP Steve Kass...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 27, 2004 at 5:57 am
Look at the site I've mentioned here http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=129464
There you'll find the explanation why this won't work.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
July 31, 2004 at 2:51 pm
Viewing 15 posts - 1,996 through 2,010 (of 5,356 total)