Viewing 15 posts - 1,546 through 1,560 (of 5,356 total)
To add to Yoda and SQLBill (and without being offending in any way!!!):
You might want to read a book on the fundamentals of relational database design. It will surely save...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 7:15 am
1) CAST and CONVERT are your friends. Do a search here and you'll find countless threads on how to get rid of the time portion in a DATETIME column. And...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 7:10 am
Probably the "best" answer is to use one of the two generally accepted independent formats. You can read about it, for example, here:
http://www.karaszi.com/sqlserver/info_datetime.asp
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 4:09 am
This example doesn't really make sense, but I couldn't think of a better one right now ![]()
USE NORTHWIND
GO
SELECT REPLACE(STR(DATEDIFF(ss,orderdate,shippeddate) / 3600,4),' ',0)+
':' +
REPLACE(STR((DATEDIFF(ss,orderdate,shippeddate) /...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 3:26 am
You should really download BOL from the MS site and work your way through it. It's worth it!
Here are some links on indexes, that also might help you:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;814324
http://support.microsoft.com/default.aspx?scid=kb;EN-US;311826
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 2:57 am
Well, Rush is quite okay. Back in those days when I played bass guitar, Geddy Lee was a hero.
Ever thought of CROSS JOINing your hair?
![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 2:54 am
Oops, nothing in particular. Must have overseen it while scrolling up and down. Sorry!
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 2:15 am
Congratulations!
Your method effectively ruled out the use of an index and should result in table scans. Not nice on larger tables. ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 2:13 am
Btw, BOL is also a free download. ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 1:57 am
http://msdn.microsoft.com/library/en-us/tsqlref/ts_fa-fz_7oqb.asp
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 1:56 am
Not sure if I understand you exactly, but see, if this helps:
http://www.karaszi.com/sqlserver/info_generate_script.asp
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 1:37 am
I would choose to have this 20 additional tables. That way you are not required to maybe put additional logic in your queries and it seems more natural and logical...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 1:08 am
What about WHERE CHARINDEX(...)>0
The documentation of the string functions you get when you look for String Functions in BOL. ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 12:57 am
IMHO, there is neither a need for a scalar UDF (a real performance killer on larger tables) nor for a tour de force in casting, converting, reversing.... If you don't...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 12:50 am
I like Metallica!
But if I look back now, it seems that my hair is getting shorter and fewer each time I see them. I guess I should blame it on...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 8, 2004 at 12:41 am
Viewing 15 posts - 1,546 through 1,560 (of 5,356 total)