Viewing 15 posts - 541 through 555 (of 5,356 total)
However, still you won't get reliable results on how many space your db allocates. TRUNCATE does not compact the database, so that result is skewed. ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 5:53 am
Yes, it is possible. However, I doubt that it is adviseable. See if these links help
http://www.sommarskog.se/dyn-search.html
http://www.sommarskog.se/dynamic_sql.html
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 5:46 am
Maybe I didn't express myself clearly. Consider this:
USE NORTHWIND
DECLARE @unit FLOAT
SELECT
@unit = UnitPrice * Quantity
FROM
[Order Details]
SELECT
@unit
SELECT
@unit = UnitPrice * Quantity
FROM
[Order Details]
ORDER BY
OrderID DESC
SELECT
@unit
...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 5:37 am
SELECT
@ExecCharge = Fee * ABS(Quantity) + ExecChargeAdjustment,
ExecCharge = @ExecCharge,
NetBroker = RateBroker * Quantity + @ExecCharge,
FROM
Trades
Separate them into two operations:
1. SELECT .. here goes all variable assignment
2. Calculation
Also, you haven't specified...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 4:40 am
Instead of deleting all/several tables, I would rather script all db objects into one file, run this under a different db name against another server and see what size I...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 4:31 am
Dates in SQL Server are a pain.
Really? ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 3:51 am
Lots of useful ideas you can find here: http://groups.google.de/groups?hl=de&lr=&frame=right&th=71fb677afa372736&seekm=Ouo5SydpEHA.3428%40TK2MSFTNGP11.phx.gbl#link1
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 3:48 am
Hey, you code might be good, but it is *not* necessary to post it to every single forum here. Most members do follow all fora here anyway. ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 1:34 am
I guess you have a typo in here and you're asking how to move the data from secondary to primary, right?
Probably the best solution here is
CREATE CLUSTERED INDEX....WITH DROP...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 1:23 am
Another oddity!
Till now the column is declared NOT NULL. Change this to NULL and run
CREATE TABLE testcase
(
MyDecimal DECIMAL(2,0)
)
CREATE INDEX ix_test ON testcase (MyDecimal)
INSERT INTO testcase VALUES(1)
SELECT
*
FROM
testcase
WHERE
CAST(MyDecimal AS DECIMAL(2,0))...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 1:07 am
I don't know for sure, but I suspect this number to be more or less randomly chosen. When you look at indid in sysindexes you see, that it's data type...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 18, 2005 at 12:58 am
IF OBJECT_ID('test_indexes') > 0
DROP TABLE test_indexes
GO
DECLARE @stmt NVARCHAR(4000)
DECLARE @i TINYINT
SET @stmt = 'CREATE TABLE test_indexes(c0 INT PRIMARY KEY'+CHAR(10)
SET @i = 1
WHILE @i <= 249
BEGIN
SET @stmt = @stmt + ' ,...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 15, 2005 at 6:54 am
Counterquestion: Isn't that enough? ![]()
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 15, 2005 at 6:42 am
See if this helps: http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsql90/html/sqlclrguidance.asp
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 15, 2005 at 4:51 am
Not to sound offending here, but, as Remi has said, have you thought of buying one? ![]()
If you however insist of getting a license...
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
April 15, 2005 at 4:16 am
Viewing 15 posts - 541 through 555 (of 5,356 total)