Viewing 15 posts - 10,186 through 10,200 (of 14,953 total)
I haven't found that it actually affects anything at all. It's probably better to include it, just on the general principle that explicit coding is better than implicit, even...
April 2, 2009 at 8:47 am
Try this:
select AccountID, AccountType, AccountValue, ValueDate,
(select SupervisedStatus
from
(select AccountID, SupervisedStatus, FromDate,
isnull((select min(fromdate)
from #SupervisedStatus s2
where fromdate > s1.fromdate
and accountid = s1.accountid), getdate()) as ToDate
from #SupervisedStatus s1) Sub1
where AccountID = #Account.AccountID
and FromDate...
April 2, 2009 at 8:31 am
Generally, I wouldn't create the PriorAudits table at all. I'd just query the Audits table and use that. Why keep the same data in two places?
Given that, here's...
April 2, 2009 at 8:09 am
Does it need to be a push service? Would it perhaps be easier to have the client app periodically pull the updates?
April 2, 2009 at 7:53 am
Looks like your system doesn't have access to the file. Check the account SQL is running under and make sure it has full access to the directory in the...
April 2, 2009 at 7:51 am
Bruce W Cassidy (4/1/2009)
Too many authors in the field of relational theory have neglected the concept of Cardinal Reciprocity. This can cause a number of subtle problems with database design...
April 2, 2009 at 6:51 am
Unless the whole reason for your post was to pose a riddle, you might want to consider posting requirements on it.
Flo's answer doesn't force the order of the table. ...
April 1, 2009 at 2:34 pm
If you post the execution plan of the query that's taking so long, we might be able to point out other things that could be done to improve it.
April 1, 2009 at 2:25 pm
Where that proc runs xp_cmdshell, remove the no_output clause. That might give you some data on what the problem is.
In SQL 2005, you'll be better of using a CLR...
April 1, 2009 at 1:38 pm
Take a look at the Modify File options in Alter Database, in Books Online.
April 1, 2009 at 1:32 pm
I must be missing something. Why would a very simple Order By not do what you need?
April 1, 2009 at 1:26 pm
You won't be able to create an indexed view on that table. However, if you can index the columns you need on the tables, instead of the view, that...
April 1, 2009 at 11:44 am
You can also create synonyms for remote objects. I've found that very useful in database refactoring, where I've needed to move a database or table to another server, or...
April 1, 2009 at 9:13 am
Never more than five?
If so, then something like this will work:
;with
Clients (ClientSeq, CustNum, ClientNum, ClientFName, ClientLName, ClientDate) as
(select
row_number() over (partition by c_custno order by cl_clino),
c_custno,
cl_clino,
cl_fname,
cl_lname,
cl_incdt
from dbo.MyTable)
Customers (CustNum, CustLast,...
April 1, 2009 at 9:01 am
Viewing 15 posts - 10,186 through 10,200 (of 14,953 total)