Forum Replies Created

Viewing 9 posts - 421 through 429 (of 429 total)

  • RE: Update Statement Not Working

    I had this problem once when the stored procedure was executed from front ent the rows effected message stops execution and returned the message.

    Is it happening even when the...

  • RE: Update Statement Not Working

    Try adding

    SET NOCOUNT ON

    as the first line of the stored procedure.

  • RE: Column values in a row

    Thank You Steve.

    There are about 2000 Machines. Parts each machine has now is 1 to 12.

    There are other columns, they are properties of machine so they are not relevent here. One would't...

  • RE: SQL - Update related table

    Thanks MIKE. I eliminate exact matches and Sum of matches as per code below.

    My code is some thing similar to this. I(Any way I convinced accounts to add a Bill...

  • RE: SQL - Update related table

    Sorry for delayed replies. Memorial Day Week End

    Our application is billing. We generate bills.

    We then pass all our bills to an accounting application. Accounting application provides datafeeds each month in...

  • RE: SQL - Update related table

    Thanks Michael.

    Only bills will be paid. It is possible to make two or more bills together but not partial payments.  

    Finding the balance amount and paid amount for an account is easy....

  • RE: Using ALL

    This is interesting. It returns false only when the sub query violates the condition. When it is blank it returns true.

    There is a work around. I wouldn't say it is elegant.

    if...

  • RE: Optimized SQL for Name Search

    CREATE PROC SearchCustomer

    (

    @pFname VARCHAR(30) = NULL,

    @pLname VARCHAR(30) = NULL,

    @pEmail VARCHAR(50) = NULL,

    )

    AS

    SET NOCOUNT ON

    SELECT * FROM CUSTOMERS

    WHERE

     Fname LIKE '%' + RTRIM(LTRIM(COALESCE(@pFname,''))) + '%' AND

     Lname LIKE '%' + RTRIM(LTRIM(COALESCE(@pLname,''))) + '%'  AND

     Email...

  • RE: Copy from a table then delete

    INSERT TableB SELECT * FROM TableA

    DELETE TableA WHERE identityCol <= (SELECT MAX(identityCol) FROM TableB)

     

    TableB Should not have Identity Column.

Viewing 9 posts - 421 through 429 (of 429 total)