Forum Replies Created

Viewing 15 posts - 166 through 180 (of 194 total)

  • RE: Dynamic Insert into

    Sorry about the delay: you'll obviously have to make some changes notably the 'Sampledb' has to be changed to your database name

    Try it with northwind or pubs first. ...

  • RE: Dynamic Insert into

    It works, but I am sure there are better ways to address some of the issues. I will try to bring in the code for this tomorrow and send it...

  • RE: How can I make a DTS step optional?

    I knew I did this somewhere but had to go play around again last night.

    Setting The execution status to completed would still fire "on failure" steps

    You can put empty activeX...

  • RE: How can I make a DTS step optional?

    By setting DTSExecStat_Success the DTS would execute subsequent steps in the the order originally specified as if the step which you skipped ( and set DTSExecStat_Success ) has run succesfully.

    Suggestion...

  • RE: Dynamic Insert into

    I believe it is;

    reason being, I have created a script ( not perfected ) that takes referential integrity, and identity columns into account and creates a sample database i.e. Schematically...

  • RE: Progress on long queries?

    I Frequent use a "Batch template" with the set rowcount statement to run updates like these. They are definately the way to go. With a bit of extra...

  • RE: How can I make a DTS step optional?

    If you want successive steps to run why not set the step to DTSStepExec_Stat_Success ( already succesfully run )

  • RE: How can I make a DTS step optional?

    If you want successive steps to run why not set the step to DTSStepExec_Stat_Waiting ( already succesfully run )

  • RE: Format to title case

    You would have to do something like

    select

    Upper( Left( @Col, 1 ) ) +

    Substring( Lower( @Col ), 2, Len( @Col ) )

    From @tab

    Replace...

  • RE: Putting dynamic SQL string together

    You are missing the 'select' keyword

    declare @sql varchar(1000)

    select @sql = 'INSERT DBCleanerTemp (TableName, trxYearMonthStart, nmbrtrx)'

    select @sql = @sql + ' Select '''...

  • RE: Putting dynamic SQL string together

    you will require quotes around @ProcessTable in the column list (i.e. 'select '''+ @ProcessTable +''', ...... )

    and square brackets in the join clause ( if you use table names...

  • RE: Putting dynamic SQL string together

    you will require quotes around @ProcessTable in the column list (i.e. 'select '''+ @ProcessTable +''', ...... )

    and square brackets in the join clause ( if you use table names...

  • RE: Union 2 tables

    two things:

    1.

    in the statement jpipes sent where you got the syntax error near "group"

    you need to alias the virtual table created by the union query see below.

    select Siteid as...

  • RE: SELECT and CASE

    Duplicating the statement and a if clause would be my choice if that is the oonly difference in the statement.

    Also dynamic is easy as you already have the set sql...

  • RE: Index Rebuilds

    Have you checked dbcc showcontig to check if defragmenting is neccessary, and if so considered using dbcc indexdefrag

Viewing 15 posts - 166 through 180 (of 194 total)