Solved

DTS export to Access | Excel | CSV condition

Posted on 2004-08-17
7
312 Views
Last Modified: 2012-08-13
Just interested how the following can be handled?

One source, and destination speficied by global variable, i.e. Access, Excel or CSV.
Is the only way to accomplish this by disabling all Data Pump Tasks by default, and then depending on the global variable, enable for example only the data pump tasks for Access ?
0
Comment
Question by:Tacobell777
  • 3
  • 2
7 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 11827548
Conditional workflow should work as well:

http://techrepublic.com.com/5100-6329-5198879-2.html
0
 
LVL 17

Author Comment

by:Tacobell777
ID: 11847937
hmm, if I understand it correctly it would mean I needed 3 branches for a condition that could take 3 possible values, or more if it can have more than 3 values, correct?

For example;

If DTSGlobalVariables("exportTo").Value = "Access" Then
              Main = DTSTaskExecResult_Success
       Else

              Main = DTSTaskExecResult_Failure
       End if

Which really handles only Access if not true pass it on to the next branch which checks to see if we can match a value

If DTSGlobalVariables("exportTo").Value = "Excel" Then
              Main = DTSTaskExecResult_Success
       Else
              Main = DTSTaskExecResult_Failure
       End if

If DTSGlobalVariables("exportTo").Value = "CSV" Then
              Main = DTSTaskExecResult_Success
       Else
              Main = DTSTaskExecResult_Failure
       End if

Is this the idea?

Its workable, but not pretty...
0
 
LVL 17

Author Comment

by:Tacobell777
ID: 11848136
not sure how pretty this is either, I got it to work as per above, but it returns 2 tasks failed, while in reality they did not really fail...
0
 
LVL 34

Accepted Solution

by:
arbert earned 250 total points
ID: 11848691
Right, you need ELSE IF statements--you don't want to fail on the else statements....Something like this:

If DTSGlobalVariables("exportTo").Value = "Excel" Then
              Main = DTSTaskExecResult_Success
ElseIf DTSGlobalVariables("exportTo").Value = "CSV" Then
              Main = DTSTaskExecResult_Success
       Else
              Main = DTSTaskExecResult_Failure
End if


You're thinking above is correct though!

Brett
0
 
LVL 17

Author Comment

by:Tacobell777
ID: 12147465
Sjeesh sorry guys,

don't know how I missed this one..

Thanks Arbert for your help on this one...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question