Sql Dinamic

Jul 20, 2005

hi

I need generate dinamic sql:
I need a select sentence with all fields of one table 't1'
and all fields of tables which 't1' have foreings keys 't1 ( reflexive ) ,t2,t3,...'

Now, l have de select part, de select from...
but I don`t know how create de join clauses ?

Some idea about this ?

Thank very much.


RaulGZ.

View 4 Replies


ADVERTISEMENT

Dinamic Name Of An Rw File Source

Dec 5, 2007






Hi,
I try to change my var on run-time on event handler of an DATA TASK that import from a row file sorce to a table into a DB.

I set AccessMode to "File name from variable"
and select "myvar".

I try the way from handler "preValidate" and also "preExecute".
Into this 2 areas I 've insert a script file that try to change "myvar" value.

Public Sub Main()
Dts.Variables("strNameFileRAW").Value = "Attributi.RAW"
Dts.TaskResult = Dts.Results.Success
End Sub


When I try on debug mode my data task I always got an erorr:
________________________________
Error at Attributi [Raw File Source [1599]]: File "\manny-slaveappWorkEXPORTRaw2007-12-05Nothing.RAW" cannot be opened for reading. Error may occur when there are no privileges or the file is not found. Exact cause is reported in previous error message.

Error at Attributi [DTS.Pipeline]: component "Raw File Source" (1599) failed validation and returned error code 0x80004005.

Error at Attributi [DTS.Pipeline]: One or more component failed validation.

Error at Attributi: There were errors during task validation.



Nothing.RAW is not a real file...I try to change on preValidate...I try also preExecute


Someone can help me....I want do all in DATATASK not in CONTROL FLOW.
A variable can be change in DATA FLOW handlers?
I wrong something.

Thanks Alen, Italy

View 10 Replies View Related

Ssis Dinamic Build Variable

Aug 28, 2006

hi,

i have a global variable that is a file dir param lets say: d:input2006_07_18.bcp.

this param supposed to be built from other 3 params i.e: day, month and year.

how do i build it dinamically i need the exact syntax. i have already put the filedir param as an evaluated expression but when i try to do somthing like:

@[User::Filename] + @[day] + @[month] + @[year] i get an error, although i succeed in putting only one param at its expression i.e: @[user:filename].

the question is how do i build the parameter that will b built from these 3 params in its expression.

Brian, i will b happy to hear from you in regard.

thx,

Tomer

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved