Forum Replies Created

Viewing 15 posts - 2,716 through 2,730 (of 3,544 total)

  • RE: BCP - Trigger

    You have put a single quote around the command, change the 3 single quotes at the beginning and end of the line like this

    SET @MyCmd = 'bcp "SELECT * from...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: New To DTS could use a hand with Ref Integrity

    What I do in my dts is to have several data transformation tasks, to build each dim table and then one to build the fact table.

    As I said you can specify...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: New To DTS could use a hand with Ref Integrity

    Assuming the Dim tables are populated correctly then get the keys/ids when you select data for the fact table

    insert into facttable

    select s.col1,

    s.col2,

    d.datekey,

    s.coln

    from sourcetable s

    inner join dimtable d on d.inputdate...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: BCP - Trigger

    The bcp will be blocked by the insert/update locks. Try adding NOLOCK hint to the tables in testprocedure.

     

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Question of the Day for 08 Apr 2004

    netstat -na will give IP Address for LISTENING but only on WIN2K SP4.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Question of the Day for 08 Apr 2004

    netstat -na will not give you IP address for LISTENING only for ESTABLISHED connections

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Cross tab

    Try This

    DECLARE @stdate datetime,@enddate datetime,@wkdate datetime,@sql nvarchar(4000),@sql2 nvarchar(4000)

    SET @stdate = '2004-04-01'

    SET @enddate = '2004-04-06'

    SET DATEFIRST 1

    CREATE TABLE #temp_sum (CODE CHAR(10))

    SET @wkdate = @stdate

    WHILE (@wkdate...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Cross tab

    Can you explain what you mean by 'skip weekends' and 'total will be wrong'.

    Are you trying to output total qty per day for a calendar month or between two dates...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Searching of key work in stored procedures

    This will search the procedures in a database but will not find the text in encrypted procedures

    declare @keyword varchar(20)

    set @keyword = 'keyword'

    select distinct s.name 

    from sysobjects s

    inner join...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Splitting string over several Columns

    Not sure what you really after, but this procedure

    CREATE PROCEDURE insert_data @input char(150)

    AS

    INSERT

    INTO [yourtable]

    (col1, col2, col3)

    VALUES

    (

    SUBSTRING(@input,1,50),

    SUBSTRING(@input,51,50),

    SUBSTRING(@input,101,50)

    )

    GO

    will split 150...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Use ARRAY for CASE statements

    After reading your other post on this matter, I would do the following

    create temp table containing identity column and teacherid. Insert the unique teacherid's (ordered if you wish) using the...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Use ARRAY for CASE statements

    quoteI would need to set up MAX(CASE.. for 662 teachers in order to satisfy any combination of the...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Export to non-standard formats

    Why are you using activex.

    Change your proc (dbo.Mainframe_Extract_LateStart) to include the spaces

    In the DTS Transform Data Task specify the query as

    EXEC dbo.Mainframe_Extract_LateStart 'HCO'

    p.s. if your proc does anything with...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Cursor

    OK try this

    CREATE TABLE #assoc (rowid int IDENTITY(1,1), BOOKING int, Z_ASSOC_ROW numeric(9,0) ,Z_ID varchar(254))

    INSERT INTO #assoc (BOOKING, Z_ASSOC_ROW, Z_ID)

    SELECT BOOKING, 0, Z_ID

    FROM GS_DETAIL

    ORDER BY BOOKING, Z_ID...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Export to non-standard formats

    You can do it in dts to a fixed length file by selecting the data and adding extra columns for the spaces, e.g

    SELECT col1,

    ' ' as Space1,

    col2,

    ' ' as Space1,

    col3,

    '...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 2,716 through 2,730 (of 3,544 total)