Need some help writing a query that will update a fields based on a lookup. The problem I’m having is related to how to perform the lookup table.
The based table looks something like this.
Stg_CustProfile:
RecordId INT,
EmailAddr VARCHAR(100),
Firstname VARCHAR(100),
Lastname VARCHAR(100)...
I help some help writing an sql statement. Lets say I have a table like:
Table Structure:
CustomerID
CompanyID
Account
FirstName
LastName
A customer can have up to 4 account codes, so data in the table will looks something like this:
CustomerID CompanyID Account[tab][tab] FirstName[tab]...
>>...but what do I use to write this code
I wrote this in a ActiveX Task
>>...and how do I run this code?
Place the above code in ActiveX Task before the data load task
You may want to visit www.SqlDTS.com to find out more information on DTS.
Hope this helps.
JC –
The problem is with the data. You defined the file as fixed-width which also means each record is a fixed number of characters long.
However according to the sample data provided the first record is 86 characters, and then the second records is only 45 characters long. So its looks like...
In most cases after you load the table. For more information check out the links below:
A Strategic Approach to Data Transfer Methods
http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnmaj/html/strategicapproach.asp
SQL Server 2000 Incremental Bulk Load Case Study...
I need some help in writing a query; I have three tables for example, 1 Parent table, 1 child table, and 1 rules table. The rules apply to all the Childs of the parent. So for example:
PARENT_TABLE
---------------
PARENT_ID
PARENT_NAME
CHILD_TABLE
-------------
CHILD_ID
CHILD_PARENT_ID...
I would create two DTS packages for this task... The first package would cycle though each sheet in the workbook, and call the second package to import the data from the excel worksheet.
Here is some code to loop though each sheet in the workbook. Hope this helps.... If you need a sample...
Is there anyway to verify if a file is being written to?
I need to verify that the file that I'm downloading has been completely uploaded before trying to download the file. The problem that I running into is the script is downloading the while the file is still be uploaded.
I requested the...
Check out the following links:
Importing XML into SQL Server 2000
http://www.perfectxml.com/articles/xml/importxmlsql.asp
Exporting SQL Data as XML
http://www.perfectxml.com/articles/XML/ExportSQLXML.asp
Examples of Bulk Loading XML Documents...
If you did not install SQLXML 3.0 SP2, then you need to before this script will work.
Link to download SQLXML 3.0 SP2 -
http://www.microsoft.com/downloads/details.aspx?familyid=4c8033a9-cf10-4e22-8004-477098a407ac&languageid=f49e8428-7071-4979-8a67-3cffcb0c2524&displaylang=en
Hope this helps.
I'm not sure but may be the link below may help -
Cookbook for using SQL Server DTS 2000 with .NET
http://www.sqldev.net/dts/DotNETCookBook.htm
DTS Global Variables and Visual Basic .Net
http://www.sqldts.com/default.aspx?265
Execute a package from T-SQL
http://www.sqldts.com/default.aspx?210
Well... The only thing I see wrong in your code is that you need a space after driver and before (*.xls), so it should be:
jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\...
Let me know if that helps.
hummm.... Make sure when you create the global variable in DTS that you set it to 1 and not 0. This is due to the way you input string is formatted.
Original String: Depts#01#02#03
After the split function DeptArray = Split(DTSSource("Text"),"#") your string becomes something like this...
The problem is that you are not really looping. Check out the code sample below and the link provide. Let me know if you need anymore help.
Hope this help you.
---- Incoming Data (Source) ----
Code Name Text
ABC1 SCREW Depts#01#02#03
ABC2 NAIL Depts#11SUR#20
ABC3 PUNCH...
Here are a few links:
IBM's Website: New to Java technology
http://www-106.ibm.com/developerworks/java/newto/
JavaWorld
http://www.javaworld.com/
Sun: Learning - New to Java Center
http://java.sun.com/learning/new2java/index.html[
Sun: Tutorials and Code Camps...
Well first off you created methods to calculate Pay and overtime pay but never call them. Another thing is that you’re if statement is outside of the main block. I modified your code a little to get it to run.
import javax.swing.*;
public class Pay
{
public static void main(String[] args)...
I'm pretty sure that not a problem... I have a select-insert statement using substrings that insert 78 fields. Another way to do what you want may be to use Transform Data Task and create a ActiveX Script inside the task, here is a example:
Function Main()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.