![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello: I have 3 table with this description: Table1 -------- id: int value1: int Table2 -------- id: int value1: int title as varchar(80) Table3 -------- id: int norden: int text : varchar I have to transform data from Table1 to Table2 but get some value from Table3 too, I explain what I want specific. in Table3 I have for every id about 24 text, and id of each text is norden, then I have to get from Table1 id and value1, to import in id and value1 to Table2, but then get the first text in Table3 for current id in progress that have more than 40 character, how can I do that. Thanks for advantage, Best regards, Owen. |
#3
| |||
| |||
|
|
If they all are in the same DB on the same server then you should do this in the SQL Statement you use as the source for your datapump. Allan "Owen" <anibal (AT) prensa-latina (DOT) cu> wrote in message news:OGVAn0w6FHA.2600 (AT) tk2msftngp13 (DOT) phx.gbl: Hello: I have 3 table with this description: Table1 -------- id: int value1: int Table2 -------- id: int value1: int title as varchar(80) Table3 -------- id: int norden: int text : varchar I have to transform data from Table1 to Table2 but get some value from Table3 too, I explain what I want specific. in Table3 I have for every id about 24 text, and id of each text is norden, then I have to get from Table1 id and value1, to import in id and value1 to Table2, but then get the first text in Table3 for current id in progress that have more than 40 character, how can I do that. Thanks for advantage, Best regards, Owen. |
#4
| |||
| |||
|
|
Please can you explain me yout idea step by step, because I'm a begginer in DTS please. Best regards, Owen. "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eXL0o6z6FHA.3544 (AT) TK2MSFTNGP09 (DOT) phx.gbl... If they all are in the same DB on the same server then you should do this in the SQL Statement you use as the source for your datapump. Allan "Owen" <anibal (AT) prensa-latina (DOT) cu> wrote in message news:OGVAn0w6FHA.2600 (AT) tk2msftngp13 (DOT) phx.gbl: Hello: I have 3 table with this description: Table1 -------- id: int value1: int Table2 -------- id: int value1: int title as varchar(80) Table3 -------- id: int norden: int text : varchar I have to transform data from Table1 to Table2 but get some value from Table3 too, I explain what I want specific. in Table3 I have for every id about 24 text, and id of each text is norden, then I have to get from Table1 id and value1, to import in id and value1 to Table2, but then get the first text in Table3 for current id in progress that have more than 40 character, how can I do that. Thanks for advantage, Best regards, Owen. |
#5
| |||
| |||
|
|
You want something very simialr to This does not really have a lot to do with DTS per se as this could be done without it. You want something very similar to (PS you do not tell is if these tables are in the same DB or even on the same server) INSERT TABLE2(Column List) SELECT (Columns) FROM TABLE2 T2 JOIN TABLE3 T3 ON T2.ID = T3.ID Allan "owen" <anibal (AT) prensa-latina (DOT) cu> wrote in message news:OrH#3w46FHA.3136 (AT) TK2MSFTNGP09 (DOT) phx.gbl: Please can you explain me yout idea step by step, because I'm a begginer in DTS please. Best regards, Owen. "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eXL0o6z6FHA.3544 (AT) TK2MSFTNGP09 (DOT) phx.gbl... If they all are in the same DB on the same server then you should do this in the SQL Statement you use as the source for your datapump. Allan "Owen" <anibal (AT) prensa-latina (DOT) cu> wrote in message news:OGVAn0w6FHA.2600 (AT) tk2msftngp13 (DOT) phx.gbl: Hello: I have 3 table with this description: Table1 -------- id: int value1: int Table2 -------- id: int value1: int title as varchar(80) Table3 -------- id: int norden: int text : varchar I have to transform data from Table1 to Table2 but get some value from Table3 too, I explain what I want specific. in Table3 I have for every id about 24 text, and id of each text is norden, then I have to get from Table1 id and value1, to import in id and value1 to Table2, but then get the first text in Table3 for current id in progress that have more than 40 character, how can I do that. Thanks for advantage, Best regards, Owen. |
#6
| |||
| |||
|
|
I appreciate your answer to my questions, but let me ask other about the same problem, I make query like you teach me but I get some row duplicate, how I can remove this duplicate row remember that in table 3 for one id have a lot of norden, I make this query: select * from table1 inner join table3 on (table1.id = table3.id) where len(table3.text) > 50 order by norden //to get the first row that get this goal, because I want to get the first order by norden then I want to elimate the duplicate id that return this query, can you help again please. Best regards, Owen. "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:uO1QKP86FHA.2576 (AT) TK2MSFTNGP09 (DOT) phx.gbl... You want something very simialr to This does not really have a lot to do with DTS per se as this could be done without it. You want something very similar to (PS you do not tell is if these tables are in the same DB or even on the same server) INSERT TABLE2(Column List) SELECT (Columns) FROM TABLE2 T2 JOIN TABLE3 T3 ON T2.ID = T3.ID Allan "owen" <anibal (AT) prensa-latina (DOT) cu> wrote in message news:OrH#3w46FHA.3136 (AT) TK2MSFTNGP09 (DOT) phx.gbl: Please can you explain me yout idea step by step, because I'm a begginer in DTS please. Best regards, Owen. "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eXL0o6z6FHA.3544 (AT) TK2MSFTNGP09 (DOT) phx.gbl... If they all are in the same DB on the same server then you should do this in the SQL Statement you use as the source for your datapump. Allan "Owen" <anibal (AT) prensa-latina (DOT) cu> wrote in message news:OGVAn0w6FHA.2600 (AT) tk2msftngp13 (DOT) phx.gbl: Hello: I have 3 table with this description: Table1 -------- id: int value1: int Table2 -------- id: int value1: int title as varchar(80) Table3 -------- id: int norden: int text : varchar I have to transform data from Table1 to Table2 but get some value from Table3 too, I explain what I want specific. in Table3 I have for every id about 24 text, and id of each text is norden, then I have to get from Table1 id and value1, to import in id and value1 to Table2, but then get the first text in Table3 for current id in progress that have more than 40 character, how can I do that. Thanks for advantage, Best regards, Owen. |
![]() |
| Thread Tools | |
| Display Modes | |
| |