Viewing 15 posts - 4,711 through 4,725 (of 6,036 total)
So, why not views?
SELECT O.* FROM orders O
INNER JOIN dbo.orders_approved A ON O.order_id = A.order_id
INNER JOIN dbo.orders_by_region R ON O.order_id = R.order_id AND R.region_id
INNER JOIN dbo.orders_by_manager M ON O.order_id = M.order_id AND M.employee = 1
INNER JOIN dbo.orders_by_year...
_____________
Code for TallyGenerator
November 30, 2006 at 9:11 pm
If your SP is a single query you may consider replacing it with a view or a table function.
_____________
Code for TallyGenerator
November 30, 2006 at 3:46 pm
November 28, 2006 at 2:52 pm
Stupidiest idea to store date as int(CYYMMDD format)!
How you would explain Server that 20061201 = 20061130 + 1? Not to mention heaps of other problems created by this approach!
You need...
_____________
Code for TallyGenerator
November 28, 2006 at 3:51 am
You better read a little bit about design of relational databases.
_____________
Code for TallyGenerator
November 28, 2006 at 1:49 am
Why would anybody need it?
_____________
Code for TallyGenerator
November 27, 2006 at 4:53 pm
Error 'string or binary data would be truncated' has nothing to do with EXEC(@String)
It happens when you are trying to insert character value with length > 50 into varchar(50) column.
Check the...
_____________
Code for TallyGenerator
November 27, 2006 at 4:26 pm
It contains list of parameters, not columns from returning recordset.
Database just cannot contain this information.
SP may return different results depending on the values of parameters, it may return more than...
_____________
Code for TallyGenerator
November 27, 2006 at 4:12 pm
You are probably missing the case of February.
You better use :
IF DAY(@date) <> DAY(dateadd(MONTH,-6,@date))
....
_____________
Code for TallyGenerator
November 27, 2006 at 4:04 pm
You don't need 30th ot 31st date. You need LAST date of the month.
Last day of the month is ALWAYS the one day before the 1st of the next month.
1st...
_____________
Code for TallyGenerator
November 27, 2006 at 2:29 pm
Right-click on the database in EM. Choose All Tasks - Generate SQL Script.
Include all objects. Run. Save it. Run to create new empty database.
Runs faster than delete from a...
_____________
Code for TallyGenerator
November 27, 2006 at 1:51 pm
If there are FK's the order of tables to delete data from is really important.
_____________
Code for TallyGenerator
November 27, 2006 at 1:21 pm
They say that one of two betting is a cheater and another one is a fool. ![]()
_____________
Code for TallyGenerator
November 27, 2006 at 1:17 pm
November 27, 2006 at 2:38 am
It would be much quicker if you would have table dbo.PostCodesDistance with columns
PostCode1ID, PostCode2ID, Distance.
You may insert/update records in this table every time you add new post codes in your...
_____________
Code for TallyGenerator
November 26, 2006 at 8:33 pm
Viewing 15 posts - 4,711 through 4,725 (of 6,036 total)