Forum Replies Created

Viewing 15 posts - 23,821 through 23,835 (of 26,484 total)

  • RE: create a stored procedure with insert and update using a cursor

    paul.starr (11/10/2008)


    when i run this i get an error:

    Msg 208, Level 16, State 1, Procedure BILLTO_Customers, Line 7

    Invalid object name 'dbo.cust.Customers'.

    USE [AtriumWOE_CS_UserData_52]

    GO

    /****** Object: StoredProcedure [dbo].[BILLTO_Customers] ...

  • RE: "=*"

    Would you please post the actual query? What you posted makes no sense to me.

  • RE: create a stored procedure with insert and update using a cursor

    paul.starr (11/10/2008)


    How do I write a stored procedure that inserts if record is not there and updates if record is there?

    ////Alter Procedure

    ALTER PROCEDURE [dbo].[BILLTO_Customers]

    AS

    DECLARE @message ...

  • RE: Question on DATEADD

    Christopher Stobbs (11/10/2008)


    well other than the fact that you missing half the BETWEEN statement I would say yes almost there.

    c.Date > = DATEDIFF(yy,-5,GETDATE())

    Please not the this will take into account...

  • RE: Stored Procedure speed versus Select Statement

    GilaMonster (11/10/2008)


    Patrick Russell (11/10/2008)


    I guess I hadn't thought of that. I actually try to stay away from dynamic sql. I always thought there where sql injection issues with it. Only...

  • RE: There must be a better way

    Don Bernstein (11/10/2008)


    I have a linkage table with 2 columns: StudentID, CustomID.

    I want to use a Print statement to show the number of students (StudentID's) in the table.

    I could not...

  • RE: SYNTAX ERROR during CAST

    It would also help if you posted the code for your UDF as well as both valid and invalid sample data for the function.

  • RE: Question on DATEADD

    Arthur.Lorenzini (11/10/2008)


    I have this AND clause:

    AND c.DateCreated BETWEEN DATEADD(YEAR, -5, GETDATE())

    Is this correct? What I am trying to get to is any records from today to 5 years ago.

    No,...

  • RE: Help controlling transaction log growth needed

    It depends. Is there anything else going on with the database that you haven't told us, like replication? There could also be some long running transactions that keep...

  • RE: Stored Procedures that access two separate databases

    Cross database access requires that the user also have rights in the other database.

  • RE: Tempdb is full due to crappy procedure!!!

    Yes, if set to unrestricted growth, it will grow until it fills the drive. You should also look at setting tempdb to grow a set amount instead of 10%...

  • RE: Help controlling transaction log growth needed

    Obviously, your ERP database is using the Full Recovery model. In this model, if you are using Full, Differential, and Transaction Log backups appropriately, you can recover your database...

  • RE: Storing Negative Numbers

    tymberwyld (11/10/2008)


    Basically what's going on here is that someone is looking at some wireframes of the UI and that's getting translated directly into a database design. If they want...

  • RE: Stored Procedure speed versus Select Statement

    GilaMonster (11/10/2008)


    Seeing the code makes all the difference. It's not technically parameter sniffing.

    That form of catch-all query does not perform well. Firstly the optimiser can't make accurate predictions with all...

  • RE: CTE's and IF Statements

    CTE's aren't temporary tables. They are much more related to derived tables.

Viewing 15 posts - 23,821 through 23,835 (of 26,484 total)