Viewing 15 posts - 4,486 through 4,500 (of 6,036 total)
Yes, it's always good to have
t.value_a/NULLIF(t.value_b, 0) > 10
but i would agree it's rather converting problem.
I guess value_a is integer, and value_b is float or decimal.
Division converts t.value_b to...
March 22, 2007 at 1:00 am
How many rows do you have in those tables?
10? 20?
Will it always stay this way?
For testing purposes populate tables with 100k rows each and run this query.
You better do it...
March 20, 2007 at 2:55 pm
1) Idea is around for I don't remember how many years. They name it "connection string".
You may store it either in .ini file or in a table in database, does...
March 19, 2007 at 3:44 pm
Your VB6 application must have calls to database to update something in table MyTable.
If this is the case then you've got deadlock.
March 19, 2007 at 2:43 am
Ninja,
if you look at the link in my post you'll realise that this "6 column" table is a result of another pivot from properly designed table.
That's why I suggested not...
March 18, 2007 at 5:46 am
Single table is better.
Just make sure (ForumId, PostingTime) is a clusterd index on this table.
March 17, 2007 at 7:42 pm
midan1, you must perform such check on original set you posted there:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=352006,
before you spoil right table structure with pivoting.
March 16, 2007 at 8:04 pm
Big tables require proper indexing.
That's a rule #1.
The rule #2:
Tables with many rows should not have many columns.
Dividing fat table into 2 or more will let you create 2 or...
March 16, 2007 at 7:55 pm
You must have clustered index on the column you use in range selections.
In your case it's [Post_Dt].
I don't think there is any use of clustered index on PK.
So, make it...
March 16, 2007 at 4:01 pm
Why varchar(8000)?
binary(8) cannot return string longer than 8 characters.
Then, there is no printable character corresponding to the code 0x0000000000000162.
Do you have any idea about meaning of the data you are...
March 14, 2007 at 6:53 pm
But it's better to include NULL interpretation in your script:
DECLARE @InfiniteDate datetime
SET @InfiniteDate = '9999-12-31 15:15'
SELECT date_int, NULLIF(MAX(ISNULL(date_out, @InfiniteDate)), @InfiniteDate)
FROM ...
March 14, 2007 at 1:06 am
1) The way you do it you get error code from SP execution.
To return something you need to use OUTPUT parameters.
2) Error code is int, not bit.
3) The way you...
March 14, 2007 at 1:01 am
COUNT does not count NULL values as well.
Use it:
SELECT CASE WHEN COUNT(date_out) < COUNT(*) THEN NULL ELSE MAX(date_out) END
March 13, 2007 at 8:32 pm
CREATE TABLE dbo.ProcessVariables (
ProcessId int NOT NULL,
VariableID int NOT NULL,
Value sql_variant NULL,
CONSTRAINT PK_ProcessVariables PRIMARY KEY (ProcessId, VariableID),
CONSTRAINT FK_ProcessVariables_Process FOREIGN KEY (ProcessId) REFERENCES dbo.Process (ID),
CONSTRAINT FK_ProcessVariables_Variable FOREIGN KEY (VariableId) REFERENCES dbo.Variable...
March 13, 2007 at 2:17 am
Create a function to convert integers to strings according to your format.
Create a table with IDENTITY column ID and computed column containing result of that function calculated from ID.
CREATE TABLE...
March 12, 2007 at 2:57 pm
Viewing 15 posts - 4,486 through 4,500 (of 6,036 total)