Link to home
Start Free TrialLog in
Avatar of wally_davis
wally_davisFlag for United States of America

asked on

New to using OPENQUERY. Need a small example of how to grab, convert, pass data to SQL.

I'm very new to using IBM Syntax, specifically a need for OPENQUERY.
I would appreciate it if someone could show me a small example of how to grab, convert, pass data to SQL.
I listed exactly what I'm trying to do below. Many thanks to whoever could help. :)
Wally
---------------------------------------------------------
SOURCE IBM DB2 DATABASE I want to convert/pull data from:
---------------------------------------------------------
IBM DB = SD0D1, Two Tablenames = Dist_State & Dist_State_Nodes. 
Two Columns (data I want to convert/import). Column 1 = Dist_State.LABEL (Unicode String, Length = 32) Values contained here are just application names (i.e. MSOFFICE). Column 2 = Dist_State_Nodes.Node_Name (Unicode String, Length = 251). Values contained here are Computer Name (i.e. JOESPC).
 
---------------------------------------------------------
DESTINATION SQL DATABASE I want to Convert/Import data to:
---------------------------------------------------------
SQL DB Name = DMS, Two Tablenames = Dms.dbo.Node.Name (Varchar(75), not null) &  Dms.dbo.Packages.Name (Varchar(251), not null). 
Both of these columns will need to have an PK/Identity Seed.
 
I need to figure out how to use OPENQUERY to convert/import data by getting data from
(DB2) Dist_State.LABEL --> (SQL) Dms.dbo.Packages.Name db/table/column AND
(DB2) Dist_State_Nodes.Node_Name --> (SQL) Dms.dbo.Nodes.Name.

Open in new window

Avatar of momi_sabag
momi_sabag
Flag of United States of America image

what do you mean by the identity seed?
Avatar of wally_davis

ASKER

By Identity Seed I mean Auto Row numbering.
ASKER CERTIFIED SOLUTION
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Momi, Thank you for the link. It gives a a nice place to start.