Viewing 15 posts - 14,041 through 14,055 (of 14,953 total)
How accurate do you need this to be?
If a few miles off one way or the other is okay, the way I would do this is a reverse distance lookup....
April 24, 2008 at 1:38 pm
In that case, is the user and password in your connection string set up correctly? Does it match a valid user, who has rights to the database you're trying...
April 24, 2008 at 1:02 pm
I dislike using automatic cascading deletes.
First, they have problems with tables with more than 1 foreign key in them. For example, you can't put a cascading delete on a...
April 24, 2008 at 1:01 pm
Can you post the actual create script for the function?
The way this is written, it should return 0 instead of null. Unless there's a problem with the way the...
April 24, 2008 at 7:57 am
If you check the options for Query Analyzer, you'll find that it has a maximum number of characters to display per column. There's a cap on that, but I...
April 24, 2008 at 7:48 am
The existence of the variables shouldn't affect the performance directly. Assuming, of course, that they are actually needed for the proc.
How they are used can very definitely affect performance.
April 24, 2008 at 7:41 am
A couple of more general points on database logging:
Using triggers to do logging will make your database slightly slower, since the triggers have to fire for any logged transaction.
Having log...
April 24, 2008 at 7:20 am
One thing you can do is:
create trigger dbo.MyTableLog on dbo.MyTable
after insert, update, delete
as
declare @TransactionID uniqueidentifier
select @TransactionID = newid()
if update(MyColumn1)
insert into MyLogDatabase.dbo.MyTable (Col, Val, Act, Trans)
select 'MyColumn1', coalesce(inserted.MyColumn1, deleted.MyColumn1, 'No Value'),
case
when...
April 24, 2008 at 7:14 am
You can use something like this for your first question:
declare @Date datetime
select @Date = '3/28/08'
;with MostRecent (RetailerID, PriceDate) as
(select id, max(date)
from dbo.pricehistory
where date <=...
April 24, 2008 at 6:58 am
I'm not sure if what you're asking for is "max" and "min". Take a look at those in Books Online and see if they will do what you need.
If...
April 24, 2008 at 6:45 am
When you installed SQL Server, what login(s) did you create? Or did you tell it to use Windows authentication only?
April 23, 2008 at 2:45 pm
I know ApexSQL Diff can be used for that. RedGate SQL Compare can probably do it too.
Might be a way to do it that doesn't require buying software. ...
April 23, 2008 at 2:43 pm
At first glance, I'd import into a "staging table" (a table that matches the spreadsheet). Then I'd build a final table that has the structure I really want. ...
April 23, 2008 at 2:27 pm
Leo Nosovsky (4/23/2008)
April 23, 2008 at 2:17 pm
Copying the table schema is simply having two copies of the table. One copy is the live table, one is the log table. The log table usually has...
April 23, 2008 at 2:07 pm
Viewing 15 posts - 14,041 through 14,055 (of 14,953 total)