473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DTS package query

308 256MB
Hi All,

I want to execute two sql statement conditionally in a single SQLTask of the DTS package -

Is it possible to implement this ?

Please reply.

Thanks!
Feb 2 '10 #1
4 1999
Delerna
1,134 Expert 1GB
I guess it depends on the condition....but Yes
Feb 7 '10 #2
madankarmukta
308 256MB
Hi Delerna,

Thank you for the reply.

I would like to know about it's implementation.

Could you please help me?

Thanks!
Feb 8 '10 #3
Delerna
1,134 Expert 1GB
Yes I can help but your question is too general

I get the "choose between two queries"...but based on what condition?


In DTS you can make a choice between two tasks based on
The success status of a third task.
The result of some VB code.
The content of a record in a table.
You can execute a stored proc passing parameters and let the stored proc make the choice
etc etc etc.



Also
Why must it be a single SQLTask?
If 3 or 4 tasks are necessary to achieve your desired result what does it matter?
Feb 8 '10 #4
Delerna
1,134 Expert 1GB
I guess to answer your question in generic tems then a simple generic example might suffice
one way is just like you would make a choice in any language.
Useing TSQL syntax, something like this
Expand|Select|Wrap|Line Numbers
  1.    IF condition
  2.    BEGIN
  3.       trueSQLQuery
  4.    END ELSE BEGIN
  5.       falseSQLQuery
  6.    END
  7.  
Feb 8 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Theodore Feldman | last post by:
If connection properties and global variables are set from an INI file, how can a DTS package be made truly portable? If the INI file pathname is hard-coded in the package, it must be edited...
3
by: Paul Reddin | last post by:
Hi, V8.1 fp4a We have been performing some performance measurements on SQL functions and have observed the following and need to verify if this is expected behaviour. Our SQL Functions...
3
by: Peter Afonin | last post by:
Hello, Our SQL server used to run under System account, and I had no problems executing DTS packages from the ASP.NET: Dim oPkg As DTS.Package oPkg = CreateObject("DTS.Package")...
1
by: Al-Pacino | last post by:
Hello All, I am am having a strange problem. I am trying to execute a DTS package from VB .NET (.aspx) page. The DTS package takes 21 minutes to execute. When the aspx page sends a command to...
1
by: KR | last post by:
The DTS package runs fine through Enterprise manager successfully. However, when scheduled through a job that runs the dts through the following code: DECLARE @findfile int Exec @findfile =...
8
by: Shals | last post by:
Hi, I have a DTS Package created in SQL Server but the client wants to execute the DTS package from within MS Access by clicking a button. If any one can tell me how to execute that DTS from...
2
by: vpai | last post by:
We have a package in production which has suddenly started consuming greater than normal time to execute. On debugging this further, we found the following: The package takes 5 mins to come out. ...
0
by: james.benson1 | last post by:
Hello All, I am trying to create a DTS package. I have two tables tbl_A and tbl_B with similar data/rows but no primary keys. tbl_A is master. I would like this package to query tbl_A and...
7
by: jb1 | last post by:
Hello All, I am trying to create a DTS package. I have two tables tbl_A and tbl_B with similar data/rows but no primary keys. tbl_A is master. I would like this package to query tbl_A and...
1
by: Flyzone | last post by:
Hi, i'm trying to execute a package from php with oci_execute. The package works perfectly from sqlplus, but the same string give me this result: "ORA-00900: invalid SQL statement" The string...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.