Viewing 15 posts - 1,306 through 1,320 (of 8,416 total)
Just for interest's sake, here's the in-line function written to use SQL Server 2012:
CREATE FUNCTION dbo.agent_datetime_inline
(
@Date integer,
@Time integer
)
RETURNS...
January 9, 2012 at 6:46 am
Ninja's_RGR'us (1/9/2012)
Well new posts seem fine for me except the ones here where we did the tests.
Check Gail's original: http://www.sqlservercentral.com/Forums/FindPost1232103.aspx
Most of the examples I posted were images, and therefore unlikely...
January 9, 2012 at 6:08 am
Ninja's_RGR'us (1/9/2012)
Not here, did you clear your cache or something?
Nope, done nuthin'. Might be just new posts, haven't checked yet. I just noticed my code came out properly...
January 9, 2012 at 5:52 am
Looks like the code colouring is fixed! :w00t:
January 9, 2012 at 5:42 am
When converting strings to date & time types, use the CONVERT function instead of CAST; it allows you to be specific about the format (style):
SELECT
CONVERT(datetime, '2012-09-01...
January 9, 2012 at 5:33 am
Anamika (1/9/2012)
i want to know the advantages you get while doing indexing on a composite key when you have integer instead of datetime/ varchar
The integer will be half the size...
January 9, 2012 at 5:27 am
You could (probably should!) consider a more relational design for this table:
Table definition
CREATE TABLE dbo.Sales
(
SalesYear smallint NOT NULL,
...
January 9, 2012 at 5:16 am
Anamika (1/9/2012)
I'm using sql server 2005.and there is only datetime which requires 8 bytes.... 🙂
So the 2008 forums is probably not the best place for your question, is it.... 🙂
January 9, 2012 at 3:36 am
Tables:
DECLARE @Customer TABLE
(
CustomerID integer PRIMARY KEY
)
DECLARE @Address TABLE
(
AddressID integer PRIMARY KEY NONCLUSTERED,
CustomerID integer NOT NULL,
...
January 9, 2012 at 3:29 am
USE tempdb
-- Test data
CREATE TABLE dbo.Reservations
(
PersonID integer NOT NULL,
CheckIn date NOT NULL,
...
January 9, 2012 at 12:46 am
Anamika (1/8/2012)
i hope when you convert the date to integer like 12-12-2011 into 12122011 and using the same for composite primary key will increase the performance in queries.
The DATE data...
January 8, 2012 at 11:41 pm
David Moutray (12/23/2011)
...you can only define one index on a table variable: the default, clustered index on the primary key.
Table variables support unique non-clustered and clustered indexes (including non-clustered...
January 8, 2012 at 11:11 pm
burtsev (1/8/2012)
How can I reduse volume of data that must be writtent to the log? Why log data is written with so HUGE number of operations?
One thing you could...
January 8, 2012 at 9:58 pm
Jeff Moden (1/8/2012)
Michael Valentine Jones (1/8/2012)
The overhead of the function call can have a large impact on the results.
Understood and agreed... that's precisely the reason I posted such a test......
January 8, 2012 at 9:24 pm
Jeff Moden (1/8/2012)
January 8, 2012 at 9:19 pm
Viewing 15 posts - 1,306 through 1,320 (of 8,416 total)