Forum Replies Created

Viewing 15 posts - 10,186 through 10,200 (of 14,953 total)

  • RE: Stored proc best practices Question

    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...

  • RE: Matching Date periods to specific date

    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...

  • RE: update field with with more then 1 result from another query

    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...

  • RE: Which technology to use for automated logging?

    Does it need to be a push service? Would it perhaps be easier to have the client app periodically pull the updates?

  • RE: Checkdb failure

    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...

  • RE: Are the posted questions getting worse?

    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...

  • RE: Multi Column Sort

    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. ...

  • RE: Help. Cannot create an index into a view

    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.

  • RE: Pivot or else...

    You're welcome.

  • RE: Delete .bak using script

    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...

  • RE: Rename - Physical Filename

    Take a look at the Modify File options in Alter Database, in Books Online.

  • RE: Multi Column Sort

    I must be missing something. Why would a very simple Order By not do what you need?

  • RE: Help. Cannot create an index into a view

    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...

  • RE: USE QCDB_160309

    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...

  • RE: Pivot or else...

    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,...

Viewing 15 posts - 10,186 through 10,200 (of 14,953 total)