Forum Replies Created

Viewing 15 posts - 91 through 105 (of 208 total)

  • RE: The Green Stuff

    The calculation would be just fine, if the currency maintained its value, or at least if interest rate was greater. Nothing about future is sure, least the value of money,...

  • RE: Help ! Can't login, SELECT permission denied .......

    Why not sys.configurations?

    Proper qualifier would be database.schema.objectname.

    Run dbcc checkdb. If ok, check the log file, if someone dropped permissions. "public" must have select permission on this system view.

  • RE: Update trigger help.

    Right. And there is more. Such trigger would fail on multirow updates, so for proper work you'd have to open a cursor.

    If the trigger instead of sending emails just inserts...

  • RE: Know your UNION(s), NULL(s), COUNT(s) ?

    Before answering I was wondering if missing ALL on final union was intentional or a typo.

    Count(*) counts all rows, Count([ALL] column) counts rows where column is not null, so it...

  • RE: Control transactions in ADO or in SQL BEGIN TRANS...?

    In web setup the client application is most of times browser. However, the server side is a client for sql server, where you implement update and transaction logic. In ASP...

  • RE: Enforce Referential Integrity across multiple tables

    I'd use "table inheritance". For example, you have customers and employees, both persons, both have different set of properties, but they have some common properties.

    create table dbo.person(

    id integer primary key,

    name...

  • RE: Control transactions in ADO or in SQL BEGIN TRANS...?

    Definitely in the client.

    However, it most be done correctly.

    For example, you have an input form with master/detail tables. When user saves the data (an OK button), you start transaction, generate...

  • RE: Lazy way to poll linked server?

    If the polling job retains the connection, it doesn't matter much.

    The simplest and most efficient would be delete with output:

    delete from linkedserver.queue output deleted.*

    The statement should not be any more...

  • RE: How do I check result from stored procedure in "if not exists"

    You mean, you want to insert only, if the record does not exist?

    Use left outer join. If it must be a procedure, convert it to table function and insert from...

  • RE: *= VS left outer join

    jim.powers (5/15/2008)


    select col1,col2 from table1,table2

    where table1.col1*=table2.col2

    and table1.col4=table2.col4

    This one would be:

    select col1,col2

    from table1

    inner join table2 as innertable2 on table1.col4 = innertable2.col4

    ...

  • RE: Ledger Balance Calculation

    Initially you wrote that ledger contains balance, actually sum of transactions.

    Your latest trigger inserts a record into ledger for each transaction, so you have several balance rows to update and...

  • RE: Database Design for 100GB DB

    There are at least 2 possible problems.

    1. each select may not have required indexes

    2. it's forced to create a temp table

    Union all does not create temp table and if #1...

  • RE: Lazy way to poll linked server?

    dataville28 (5/23/2008)


    Hi!

    Goal:

    Server A has sql statements that should execute when a row is inserted

    in a spesific table on server B.

    Situation:

    Server B is a linked server of Server A and all...

  • RE: Recommend Design Approach (Normal Form vs Performance)

    I'd leave it as it is.

    I mean, if they are addresses, they should be normalized, but to override a description or any other simple attribute, such design is OK.

    Normalized model...

  • RE: Query output

    The problem is the two statements have different where conditions and second has no group by clause, so you can't combine them.

Viewing 15 posts - 91 through 105 (of 208 total)