Forum Replies Created

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

  • RE: SP won''''t let me insert into table

    The following worked:

    CREATE PROCEDURE [dbo].[Clone_Project]

    (

    @id int,

    @count int

    )

    AS

    BEGIN

     DECLARE @rc int

     DECLARE @i int

     DECLARE @title varchar(2000)

     BEGIN TRANSACTION

     SELECT Project_Name, Project_Description, Project_Start_Date, Project_Due_Date, Project_Key_Contact, Project_Owner,

      Project_Estimated_Days, Project_Est_Self_Study, Project_Est_Classroom, Project_Business_Strategy, Project_Multiple_Sponsor,

      Project_Program_ID, Project_Indicator_ID, Project_Level_ID, Project_LifeCycle_ID,...

  • RE: SP won''''t let me insert into table

    The intent of the SP is to copy all the columns in the source row except for the Project_ID (identity column) and insert them into "n" new rows. Each new row would...

  • RE: Import Data issue

    No problem...  

  • RE: Import Data issue

    I agree. Be default if you don't select a destination table in the Import wizard it defaults to a table name derived from the name of the source file or...

  • RE: Text File - How to use second row as column names

    You could always write an ActiveX step prior to your transformation to read the original file and create a new file minus the header record. You would need to change...

  • RE: DTS - How to report success

    You want the workflow as described in http://www.sqldts.com/default.aspx?218. This allows you to check for files and bypass the processing branch if there are no files present. The job will...

  • RE: Raise an error to ADO from a stored proc

    Note for next time: Post the calling VBScript as well. If I had seen your Connection.Execute statement I could have told you it was missing the adExecuteNoRecords. It didn't even...

  • RE: Updating Identity Column

    Remember if you use the above technique and you have child tables you must update the records in the child tables with the new key prior to deleting the old...

  • RE: Update database structure from Access database to SQL server

    The upsizing wizard has done a fair job for us with the following constraints in Access:

    1. Make sure all your tables have Primary Keys
    2. Watch out for duplicate keys -- Access allows...
  • RE: Cast-Convert question

    Why do all the conversions:

    DECLARE @val decimal(8,0)

    DECLARE @val1 decimal(4,0)

    DECLARE @val2 decimal(4,0)

    set @val=10005555

    set @val1 = floor(@val/10000)

    set @val2 = @val-(@val1*10000)

    print 'V1:'+cast(@val1 as char(4))

    print 'V2:'+cast(@val2 as char(4))

    V1:1000   

    V2:5555

     

     

  • RE: Move records to a new table based on date

    ...or a DTS job. Either way depending on what tools you know.

  • RE: Is there a better way?

    I agree with noeld. Perhaps something like:

    CREATE PROC USP_CalculateEconImpactDays

    (

    @MeetingID INT,

    @MeetingEventCategoryID CHAR(1),

    @DelDays INT,

    @econimpactdaystotal INT OUTPUT

    )

    AS

    SET NOCOUNT ON

    SET @econimpactdaystotal =

    CASE @MeetingEventCategoryID

      WHEN 'L' THEN @DelDays * 175

     ...

  • RE: advice on ActiveX and HTML possibilities please

    Assuming you are using CDOSYS to send your mail in your ActiveX script you can create HTML emails by using HTMLBody={text string with HTML markup} rather than TextBody. You can...

  • RE: NEED HELP - EXPORTING SQL TABLE TO XCEL

    The easiest way to construct this package is the Enterprise Manager->All Tasks->Export Data Wizard. Select SQL as the source and Excel as the destination. ON the "Select Source Tables and Views" page...

  • RE: Need help copying one table to another. Should be easy.

    The best way to ensure your insert runs smoothly is to name the source and target columns:

    Insert into Table1 (col1, col2, col3...coln)

    Select (cola, colb, colc...colz) from Table2

    Making sure the columns...

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