Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL Packages

SQL Packages

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadmincareer
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maro18
    wrote on last edited by
    #1

    Hi Everyone Im a Beginner in using DTS i want to make a package in SQL Server That execute an sql query: - If this query returns rows, i want to take the first field for every row and give it to a second job that execute another query using this field in a loop until the number of fields ends - And if this query doesent return any rows, i want to skip the others steps that follow it How Can I Do It????????:confused:

    D 1 Reply Last reply
    0
    • M maro18

      Hi Everyone Im a Beginner in using DTS i want to make a package in SQL Server That execute an sql query: - If this query returns rows, i want to take the first field for every row and give it to a second job that execute another query using this field in a loop until the number of fields ends - And if this query doesent return any rows, i want to skip the others steps that follow it How Can I Do It????????:confused:

      D Offline
      D Offline
      DreadPirateRoberts
      wrote on last edited by
      #2

      Hi Maro, I came across an article today that might help you get started. http://www.sqlteam.com/item.asp?ItemID=6881 The article was actually about trapping errors, but there are a couple of lines that may point you in the right direction: Basically, try this: declare @RC int set @rc = 0 select Column1 from Table1 select @RC = @@ROWCOUNT if @RC > 0 begin {do the second job} end I realize this doesn't solve your entire problem, but I hope it at least points you in the right direction. -DPR

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups