Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gradley

    Formatting An Expression With A Carriage Return For Send Email Text

    Insert char(13) carrage returns into your text string: Example: 'This is line one ' + Char(13) + 'This is line two. ' char(9) can also be used for tabbing.
  2. gradley

    DTS package fails on connection to server

    A couple of things to consider! 1. When you say schedule, if you mean SQL Server Agent, the permissions for the account that starts up the SQL Server Agent service are used. 2. When creating a file to the network, are you using the UNC to the network folder or mapping a drive. You should be...
  3. gradley

    Error in ExecuteSQl task

    You should probably use "LONG" or "SHORT" when adding to the ParameterMapping. How is the field defined in the database table? SSIS is more strict about data types than DTS was. If you haven't tried them yet, Expressions are another way to code parameter queries. They are a little...
  4. gradley

    Error in ExecuteSQl task

    I would verify your connection string from the General tab of the Execute SQl task in SSIS. 1. Are you using an OLE-DB Connection Type? 2. Verify that the connection is actually pointing to the database you believe it is. 3. Does the parameter mapping section have the right variable and type of...
  5. gradley

    Error in ExecuteSQl task

    Does this statement work outside of SSIS (replacing the "?" with an actual value or variable)?
  6. gradley

    Error in ExecuteSQl task

    Is NewsletterID in the HouseholdNewsletter table? If so, the where clause should read: Where b.NewsletterID = ?
  7. gradley

    Error in Execute SQL

    See response in thread: thread961-1267491
  8. gradley

    Error in ExecuteSQl task

    Actually the alias the message is referring to is the one you have qualified in the set statement I usually perform update statements as follows: update PushmailListGen..tmpNewsLetterSync set stauts = 1 from PushmailListGen..tmpNewsLetterSync a join HouseholdNewsletter b on <join table fields...
  9. gradley

    Error in ExecuteSQl task

    Is HouseholdNewsleter in the database that matches the connection string? Was it created by owner dbo, or is it a user table?
  10. gradley

    Error in ExecuteSQl task

    I've always had problems using the "?" parameter logic in DTS. It never parses for me unless it's the first statement in the script. It should in fact run correctly once you have your input parameters setup correctly. You may have to fake out the script with a dummy select statement based...
  11. gradley

    Getting error connecting to source

    Hi Margaret, Are you running this interactively or from SQl Server Agent. I notice you are using a UNC naming convention. Is it possible the package (based on the service account if "SQL Agent" or current user if interactive) does not have permissions to this network drive?
  12. gradley

    DTS Import Text file

    Another option is to use File System Object (FSO) within an ActiveX script to rename or move the files to a different folder. This examaple adds a "U" prefix to the file name and keeps it in the same folder: Dim fso Dim strFile Dim strPath Set fso =...
  13. gradley

    script error/question from quasi-newbie-

    See if this works for you. I haven't tried it since I don't have a copy of your tables but it should work. UPDATE salesorderdelivery SET sod_csa_recordid = sts.csarecordid FROM salesorderdelivery sod INNER JOIN shiptospecial sts on sts.somrecordid = sod.sod_som_recordid
  14. gradley

    Automate DTS whe DB name changes

    Ooops!! Sorry about that... Anytime!! Glad to hear you got it working...
  15. gradley

    Automate DTS whe DB name changes

    Is it possible the "dbo" is not the owner of either the source or destination tables? If so, you will want to replace .dbo. with the actual table owner.
  16. gradley

    Automate DTS whe DB name changes

    Glad to help -- hope it works for you!!!
  17. gradley

    Automate DTS whe DB name changes

    Assuming only 1 database is created each time you run this job, you can add an Execute SQL task in DTS that performs the following: Declare @varDBName as varchar(256) Declare @strSQL as varchar(5000) -- Determine Most Recent created database SET ROWCOUNT 1 -- Retrieves only one record from...
  18. gradley

    Conditional execution within a DTS Package

    Are you asking how to send emails or how you would condition the sending of an email? If it's the latter.... I would suggest you perform a Select Count(*) from ... on the criteria you are using to create the text file. Store the result of the count in a Global Variable. In a separate task...
  19. gradley

    simple rowcount package

    The User:: prefix isn't really required unless you use the same name as a System variable. I use it just for clarity. Glad to hear it worked!!!
  20. gradley

    simple rowcount package

    Sorry - one correction... The VariableName value should be User::cnt (without the @ sign).

Part and Inventory Search

Back
Top