Forum Replies Created

Viewing 15 posts - 406 through 420 (of 605 total)

  • RE: Ecomm. query help please!

    Not tested this out on the tables, but think it will work.

    select p.prod_name, o.prod_id from OrderDetails o, Products p

    where o.order_id in (

     select order_id from OrderDetails

     where prod_id = @prodid)

    and o.prod_id =...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Column as Row in SQL

    Rather than giving you the statement straight off, you are much better off doing a quick tutorial to give you the basics.

    go to site for an online tutorial which lets...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Problem while using bcp

    Try bring an 'execute sql task' into the package and select the connection you have made. Run a simple select statement on the table you are trying to export from....


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Problem while using bcp

    Looks to me that the either username and password you connect to the remote server with are invalid, or -

    The server that you are logging errors to has an...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Force access to use a real app name

    I am assuming your access db is connecting to sql server from your post and that you use a a connection string rather than the link table manager.

     

    If so you...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Workflow script

    I'm not sure, but I think that you need to declare sStepName as a global variable in the package.

     

    I hade trouble before when using dim to declare a variable and...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: print stored procedure result data into text file

    You need to specify -E. Never done so myself but take a look at this:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_mta_01_2r1e.asp


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: print stored procedure result data into text file

    bcp will not work for stored procedures. You will need to use osql.

    See BOL for examples of how to. Here's one:

    To Execute an sp called sp_output and store the result...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: How to format osql output

    You need to create fixed sized variables for each column in the select query that can then be used to generate the result set.

     

    E.g

    declare @res1 varchar(20)

    declare @res2 varchar(10)

     

    select @res1 =...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: DTS and Nulls - Active X

    Whoops!

    Apolgies, helpmeinohio.

    Been working on sql past few weeks and totally forgot. See kamleshagnihotri post as is totally correct.


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: DTS and Nulls - Active X

    Doing it that way does not alleviate the problems of null. You can put in a space between the doubole quotes to stop it.

    However, you may want to check the...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Dynamic DTS

    Don't know if I am reading your post correctly or not, but assume you need something like this in the activex task -

    DTSGlobalVariables("gv1").value = Month(DTSGlobalVariables("gv2").value)

     

    Hope it helps.


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: DTS and Nulls - Active X

     

    I take it you have something like this:

    DTSDestination("Col1") = DTSSource("myCol")

    All you need to do is to assign a value to the source if it is null. For example, if...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Get Second Highest Value

    Ugly - But it works

     

    create table tmp_tmp_tmp

    (id int)

    insert into tmp_tmp_tmp values (1)

    insert into tmp_tmp_tmp values (2)

    insert into tmp_tmp_tmp values (3)

    insert into tmp_tmp_tmp values (4)

    select max(id) from tmp_tmp_tmp

    where id <> (select...


    ------------------------------
    The Users are always right - when I'm not wrong!

  • RE: Export queries to individual Excel files

    Here goes. I will try to keep it as brief as possible. Assuming you have knowledge of creating input and output variables in dts packages. if not see here for...


    ------------------------------
    The Users are always right - when I'm not wrong!

Viewing 15 posts - 406 through 420 (of 605 total)