Deployment Data with a timestamp column (failed)


Author
Message
Tony Charpentier
Tony Charpentier
StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)
Group: StrataFrame Users
Posts: 10, Visits: 81
Hello,

i would like to use a Deployment Data on DDT,
to copy a reference table source on destination table.

But i have timestamp column and i can't choose each column i want .

Have you an idea to force the export ?
Reply
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Hi Olivier,

for the 1st way, let's wait for a solution by Ivan or Trent, I've not yet experimented this way

But for the 2nd way, for sure you can SET IDENTITY_INSERT in the same connection as your sql command from within a BO. In your sqlcommand text, you begin by your SET Identiyt..., don't forget to put a semicolumn ( ; ) and then all the stuff you nedd (some update sql command in your case). And you send all by an ExecuteNonQuery method.

You could try a 3rd way, write a Store Procedure on your SQL server, accepting a table as parameter, the SP will do the job with a MERGE (parameter will hold the old value and the corresponding new value)

another way would be a dedicated table, with some trigger on update.




Salut Olivier,

en ce qui concerne la première solution, attendons les réponses de Ivan et de Trent, je n'ai pas fait de tests dans ce sens.

Mais en ce qui concerne ta 2ème piste, alors bien sur que oui, tu peux passer un SET IDENTITY_INSERT dans la même connexion qu'une commande SQL depuis un BO. Dans le texte de ton SqlCommand, tu commence par définir ton SET identity_ etc.., et tu conclus ta ligne par un point virgule ( ; ), ensuite tu rajoute tout ce que tu veux faire (des commandes update dans ton cas). Et tu envoies le tout par une méthode ExecuteNonQuery.

tu peux aussi explorer une 3ème possibilité, écrire une procédure stockée SQL qui accepterait une table en paramètre, la SP ferait le boulot avec un MERGE (la table en paramètre contiendrait les valeurs anciennes et les nouvelles leur correspondant)

et il y a aussi une autre soluce, qui serait une table dédiée, avec un trigger on update.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search