Sp to call another SP if all the latest packages ran successfully

Hi-
I have 3 ssis packages, If in the recent execution all the packages ran successfully then another SP has to run. I have created a audit table which keeps the package info. Below is the audit table.
pkg_name,exe_status,pkg_exe_time
pkg3,fail,2014-02-01 08:27:12.867
Pkg1,Succ,2014-02-02 09:26:47.203
pkg2,succ,2014-02-26 09:27:09.920
pkg2,fail,2014-02-27 09:41:52.457
Pkg1,Succ,2014-02-28 09:42:01.750
pkg3,Succ,2014-02-28 09:42:28.740
I have to write a stored procedure which will call another SP.
If the "pkg_exe_time" is the latest time and "exe_status" is "succ" for all the pkg_name(pkg1,pkg2,pkg3) then only it will execute another sp.
Can any one please help me to write a sp.
Regards,
Partha

wil look like below
CREATE PROC Proc1
AS
IF NOT EXISTS(
SELECT 1
FROM (SELECT ROW_NUMBER() OVER (PARTITION BY pkg ORDER BY pkg_exe_time DESC) AS Rn,*
FROM audittable)t
WHERE Rn = 1
AND status = 'fail'
EXEC Procedure2 ...
GO
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Web Service call to BPM to call another Web Service - all synch

    HI all,
    I have a webservice call to GetDocument from external system. In BPM I like to call another ws (SearchDocument) to retrieve metadata, which I need to complete the first GetDocument webservice. All synch if possible.
    Any idea how to achieve this with (or mayby without) BPM ??

    Thanks for your reply. Can you elaborate on that a bit more ?
    My first WS call is to get a document..but because I need to add some metadata in order to have a succesful call I need to call another WS first to the same system to get the required metadata. Then I need to use this metadata to complete the first - GetDocument- call....
    Hope this clarifies the scenario...
    Is it maybe possible to do this another way..in sequence..using response data to populate another ws call ??
    all help appreciated !
    cheers,

  • Question about the sensor... just got my 4s yesterday after screwing up my 3 with the laterd version update.  EVery call I have been on has either changed to speaker, called another number or ended the call or activated facetime, which I have turned off.

    Question about the sensor... just got my 4s yesterday after screwing up my 3 with the laterd version update. EVery call I have been on has either changed to speaker, called another number or ended the call or activated facetime, which I have turned off. never had this trouble with my 3...I don't even want to talk to anyone on this phone! Is the sensor bad? That is what the AT&t rep suggested.

    Restore as new... if the problem still continues then there is a hardware issue.
    If it stops after a restore as new, then the issue is with the backup the device is currently setup with.

  • I had to redownload cs6 from another drive and all the files are there but it wont open any of it

    i had to redownload cs6 from another drive and all the files are there but it wont open any of it

    Copying/transferring will not work.  You need to install the software using installation files.
    CS6 - http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html

  • TS1369 After updating iTunes this week Windows 8 recognizes the iPod but does not offer an option to open with iTunes. iTunes does not recognize iPod Touch. Have followed all the steps but without success. Is there a solution with iTunes?

    After updating iTunes this week Windows 8 recognizes the iPod but does not offer an option to open with iTunes. iTunes does not recognize iPod Touch. Have followed all the steps but without success. Is there a solution with iTunes?

    I followed all the instructions on the suggested page. Many files in C:\Program Files\Common Files\Apple\ and C:\Program Files (x86)\Common Files\Apple\ could not be deleted. Message said ""Cannot delete files: It is being used by another person or program"' but could not find iPodService.exe in task manager (also, the "Cannont delete ... " did not mention iPodService.exe).
    Deleted all that I could. Reinstalled iTunes. Still same result. iTunes and computer both recognize my old iPod. Only the computer recognizes iPod Touch.

  • Pacman isn't showing all the installed packages

    Hey guys!
    Since last week pacman isn't showing all the installed packages in my system. If I issue the command pacman -Q it just returns the following packages:
    a52dec 0.7.4-4
    acl 2.2.49-2
    alsa-lib 1.0.23-2
    atk 1.32.0-1
    attr 2.4.44-2
    avahi 0.6.28-1
    bash 4.1.009-3
    bzip2 1.0.6-1
    cairo 1.10.2-1
    cairo-perl 1.061-3
    compositeproto 0.4.2-1
    coreutils 8.10-1
    cracklib 2.8.18-1
    damageproto 1.2.1-1
    db 5.1.19-3
    dbus 1.4.1-1
    dbus-core 1.4.1-1
    desktop-file-utils 0.18-1
    e2fsprogs 1.41.14-1
    expat 2.0.1-6
    faac 1.28-2
    ffmpeg 20110121-2
    filesystem 2010.12-1
    findutils 4.4.2-3
    fixesproto 4.1.2-1
    fontconfig 2.8.0-1
    freetype2 2.4.4-2
    gcc-libs 4.5.2-6
    gdbm 1.8.3-8
    gdk-pixbuf2 2.22.1-1
    gettext 0.18.1.1-1
    glib-perl 1.223-2
    glib2 2.26.1-1
    glibc 2.13-1
    gmp 5.0.1-2
    gnutls 2.10.4-1
    gtk2 2.22.1-1
    gtk2-perl 1.222-2
    gzip 1.4-2
    heimdal 1.3.3-4
    iana-etc 2.30-1
    imagemagick 6.6.7.3-1
    inputproto 2.0.1-1
    kbproto 1.0.5-1
    lame 3.98.4-1
    lcms 1.19-1
    libarchive 2.8.4-2
    libcap 2.20-1
    libcups 1.4.6-1
    libdaemon 0.14-1
    libdatrie 0.2.4-1
    libdrm 2.4.23-1
    libdv 1.0.0-3
    libdvdread 4.1.3-2
    libfetch 2.33-1
    libgcrypt 1.4.6-1
    libgl 7.10-1
    libgpg-error 1.9-2
    libice 1.0.7-1
    libjpeg 8.3.0-1
    libldap 2.4.23-1
    libmp4v2 1.9.1-1
    libmpeg2 0.5.1-1
    libogg 1.2.2-1.1
    libpng 1.4.5-1
    libsasl 2.1.23-5
    libsm 1.2.0-1
    libtasn1 2.8-1
    libthai 0.1.14-1
    libtheora 1.1.1-1
    libtiff 3.9.4-1
    libtool 2.4-2
    libva 1.0.8-1
    libvdpau 0.4.1-1
    libvorbis 1.3.2-1
    libvpx 0.9.5-2
    libx11 1.4.1-1
    libxau 1.0.6-1
    libxaw 1.0.9-1
    libxcb 1.7-1
    libxcomposite 0.4.3-1
    libxcursor 1.1.11-1
    libxdamage 1.1.3-1
    libxdmcp 1.1.0-1
    libxext 1.2.0-1
    libxfixes 4.0.5-1
    libxft 2.2.0-1
    libxi 1.4.1-1
    libxinerama 1.1.1-1
    libxml2 2.7.8-1
    libxmu 1.1.0-1
    libxpm 3.5.9-1
    libxrandr 1.3.1-1
    libxrender 0.9.6-1
    libxt 1.0.9-1
    libxv 1.0.6-1
    libxxf86vm 1.1.1-1
    linux-api-headers 2.6.37-1
    lzo2 2.04-1
    mjpegtools 1.9.0-4
    ncurses 5.7-4
    opencore-amr 0.1.2-1
    openjpeg 1.3-3
    openssl 1.0.0.d-1
    orc 0.4.11-1
    pacman 3.4.3-1
    pacman-cage 2.9.8.2-4
    pacman-mirrorlist 20101223-1
    pam 1.1.3-1
    pango 1.28.3-1
    pango-perl 1.221-3
    pcre 8.12-1
    perl 5.12.3-1
    perl-anyevent 5.24-1
    perl-event 1.13-3
    perl-event-execflow 0.64-2
    perl-gtk2-ex-formfactory 0.66-2
    perl-libintl-perl 1.20-2
    pixman 0.20.2-1
    popt 1.16-3
    randrproto 1.3.2-1
    readline 6.1.002-2
    renderproto 0.11.1-1
    schroedinger 1.0.10-1
    sdl 1.2.14-6
    shadow 4.1.4.2-4
    shared-mime-info 0.90-1
    sqlite3 3.7.5-1
    tar 1.25-1
    texinfo 4.13a-5
    transcode 1.1.5-5
    tzdata 2010o-1
    util-linux-ng 2.18-4
    videoproto 2.3.1-1
    x264 20110115-1
    xcb-proto 1.6-2
    xextproto 7.1.2-1
    xf86vidmodeproto 2.3.1-1
    xineramaproto 1.2.1-1
    xproto 7.0.20-1
    xvidcore 1.2.2-1
    xz 5.0.1-1
    zlib 1.2.5-3
    Here you can see a shot of my /var/lib/pacman/local directory, containing just a few directories related to the packages above.
    I have a lot more installed in my system, eg. the holl KDE system.
    Is there a command/workaround to make these missing packages appear again in pacman?!
    Thanks in advance.
    Last edited by estevao (2011-02-11 17:29:52)

    Spider.007 wrote:
    Leonid.I wrote:
    mcmillan wrote:You probably can do some searching to track it down (or rewrite something similar if you know how) prior to going through with a complete reinstall.
    ... which (complete reinstall) will be required with high probability, since all the solutions proposed above will most likely break the system
    Arch Linux is more than just GNU/Linux -- it's an adventure
    I think your signature is either too sarcastic, or too much in contrast with what you are posting here. A damaged database is really no big deal, and the only things that the proposed solutions attempt to do is that pacman re-installs a package (which changes close to nothing in your actual installation) and then write that update to its database.
    I do not agree with your statement that the probability of a required reinstall are high. Actually, I would say they are pretty low
    There is nothing sarcastic about my sig. Indeed, what would be the fun of using a system, which never breaks?
    Regarding the probability of a reinstall either my opinion, or yours is irrelevant for the topic of this discussion.
    Finally, I would like to draw your attention to the little thingie in the end of my post: ":)" . It's called smiley and was  put there for a reason, you know...

  • My HP scanner/printer scans but my iMac doesn't seem to accept the scans in either iPhoto or Pictures.  I've got os 10.6.8 and all the latest sofware updates for the scanner and for iPhoto.  Helpv

    My Hp printer/scanner C5280 used to work fine with my iMac with OS 10.6 but lately after doing the scan it doesn't seem to finish by putting the scan in either iPhoto or in pictures.  I have all the latest sofware updates for both devices. The scanner does the "preview" scan right away and the copier works fine.  Is there some setting I am overlooking?

    Try using Image Capture, you will find it in your Applications folder. In either IC or the method you are using you can tell the application to scan to a destination. It will look similar to:
    If you still have trouble give AppleCare a call or visit your local Apple Store Genius and they can walk you through it. Your problem may be the at you are not defining anything in the preview to be scanned, you do this by dragging the mouse over the area you want scanned and it will draw a box around it.  Here is a screen shot that show's that.

  • After hours of back-up, downloading and uploading...I am now updated with all the latest Mac software. However, I no longer have access to Excel and Word. Is there a way I can access my documents in either of those? Help, please.

    After hours of back-up, downloading and uploading...I am now updated with all the latest Mac software. However, I no longer have access to Excel and Word. Is there a way I can access my documents in either of those? Help, please.

    If you have older versions of excel and word that previously ran under the Rosetta emulator (allows PowerPC code to run on Intel system), they will no longer work with Lion.
    You can use the Apple programs Pages and Numbers to access the files. They can be bought and downloaded from the App store. NeoOffice is available at http://www.neooffice.org/neojava/en/index.php which has Lion support. OpenOffice doesn't talk to Lion support, it's at http://www.openoffice.org/

  • Encore keeps crashing on startup on macbook pro. I have all the latest cc and osx updates

    encore keeps crashing on startup on macbook pro. I have all the latest cc and osx updates

    What specific OS and Encore versions? Since you say "latest OS updates," I assume Mavericks, and is this the relatively new 10.9.1 version?
    Where in the startup does it crash? Is there an error message?
    Mavericks causes a variety of issues, and we don't have enough data to really pin them down. At least with the original Mavericks, some users appeared to get CS6 to run with some serious but workable problems.
    Make sure you have handled any permissions issues.
    This describes such issues:
    Troubleshoot system errors and freezes | Adobe software on Mac OS 10.x
    http://kb2.adobe.com/cps/824/cpsid_82414.html

  • How can I see for a particular TCode who were all the users who ran it ?

    I want to see who were all the users who ran a particular TCode e.g ZVPT today? Can I also do the same thing to see which users ran a particular program today?

    Hi,
      Use tcode STAD.
    Pls. reward if useful....

  • I can't share a song i created in garageband to iCloud using iPhone 6. I have all the latest updates and i have iCloud drive enabled and turned on as well as sharing through garage band

    I can't share a song i created in garageband to iCloud using iPhone 6. I have all the latest updates and i have iCloud drive enabled and turned on as well as sharing through garage band turned on. The option to share to iCloud just doesn't appear. Also, everything on my macbook is up to date and iCloud options are all turned on.

    Have you enabled iCloud in the Settings for GarageBand on your iPhone?  See this page:  http://help.apple.com/garageband/iphone/2.0/index.html#chsdfe5c2c2
    Turn on iCloud for GarageBand
    You turn on iCloud for GarageBand in the Settings app on your device.
    Close GarageBand.
    On the Home screen, tap Settings, then tap General.
    Tap GarageBand.You might have to scroll down to see the GarageBand icon.
    If the Use iCloud switch is not turned on, tap it.

  • My phone wont power up and its not the battery or the software as ive updated all the latest versions to my pc, it gets to the apple on power on and switches off? halp!!!

    my phone wont power up and its not the battery or the software as ive updated all the latest versions to my pc, it gets to the apple on power on and switches off? help!!!!

    got no idea me like??

  • All the SSIS Packages are not editable to the all users after deploying to the other server

    Hi All,
    I am using sqlserver2012.
    How to make all the SSIS Packages are not editable to all users after deploying to the other server. is there any way to achieve this,
    if yes, could share the information how to do....
    Thanks in advance....
    RamarajuC

    Typically, you change the protection level as listed in the following steps:
    During development, leave the protection level of packages set to the default value,
    EncryptSensitiveWithUserKey. This setting helps ensure that only the developer sees sensitive values in the package. Or, you can consider using
    EncryptAllWithUserKey, or DontSaveSensitive.
    When it is time to deploy the packages, you have to change the protection level to one that does not depend on the developer's user key. Therefore you typically have to select
    EncryptSensitiveWithPassword, or EncryptAllWithPassword. Encrypt the packages by assigning a temporary strong password that is also known to the operations team in the production environment.
    After the packages have been deployed to the production environment, the operations team can re-encrypt the deployed packages by assigning a strong password that is known only to them. Or, they can encrypt the deployed packages by selecting
    EncryptSensitiveWithUserKey or EncryptAllWithUserKey, and using the local credentials of the account that will run the packages.
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

  • I have the following Imac and Iphoto 11 in Finder folder I upgrade the iphoto file  and  all the latest event files, can you help how to solve the problem? Thank you  Model Name iMac    Model Identifier:     iMa

    I have the following Imac and Iphoto 11 in Finder folder I upgrade the iphoto file  and I lost all the latest event files, can you help how to solve the problem? Thank you
    Model Name:     iMac
    Model Identifier:     iMac8,1   Processor Name:     Intel Core 2 Duo
    Processor Speed:     2.4 GHz

    http://support.apple.com/kb/HT2638?viewlocale=en_US&locale=en_US

  • My Mac book pro keeps saying "connection time out occurred" I have a 2011 pro with all the latest updates. It keeps doing it and it really annoys me! Please help!

    My Mac book pro keeps saying "connection time out occurred" I have a 2011 pro with all the latest updates. It keeps doing it and it really annoys me! Please help!

    Take each of the following steps that you haven't already tried, until the problem is resolved.
    Step 1
    Restart the router. Many problems are solved that way.
    Step 2
    Change the name of the wireless network, if applicable, to eliminate any characters other than letters and digits. You do that on your router via its web page, if it's not an Apple device, or via AirPort Utility, if it is an Apple device.
    Step 3
    From the menu bar, select
     ▹ System Preferences... ▹ Network
    Click the Assist me button and select Assistant. Follow the prompts.
    Step 4
    Back up all data.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Enter the name of your wireless network in the search box. You should have one or more "AirPort network password" items with that name. Make a note of the name and password, then delete all the items. Quit Keychain Access. Turn Wi-Fi off and then back on. Reconnect to the network.
    Step 5
    You may need to change other settings on the router. See the guidelines linked below:
    Recommended settings for Wi-Fi routers and access points
    Potential sources of interference
    Step 6
    Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.

Maybe you are looking for

  • Storage type to be assigned to particular storage location

    Hi, As per clients new business requirement, 2 storage locations of a plant are assigned to same warehouse. But as the storage types comes under warehouse they come under both the storage locations. Is there any configuration to assign specific stora

  • ITunes crashes about 50% of the time I try to sync

    Hello, Since the most recent update iTunes crashes about half the time when I try to sync my iPod Touch.  I had the problems updating, but I eventually got through the error related to mobile devices. When the sync works, everything is fine.  Apps up

  • 17" MacBook Pro (2008) Getting hot while being used

    Recently I have been noticing that my macbook pro is getting very hot when it get used, especially if it is used for video or for extended time periods. The computer gets very warm, almost hot to the touch, particularly above the keys and on the bott

  • Ultimate iChat connection problem

    Just yesterday, iChat started refusing to connect to AIM for some reason. The connection continually timed out. Neither iChat, AIM proper, nor any other instant messaging client will connect to the AIM network. I tried changing both the AIM server, a

  • WebVPN Content Rewrite - how can we bypass it?

    We are publishing a Bookmark through a WebVPN portal to a server on the inside of our network.  That bookmark is made available to users via DAP. The bookmark works for the most part, however the internal website does not function very well through t