How to update my database file.
Hi,I have a table in my database.i need to update that file ..i m trying to use oledb sql command but it is not working. table1 --->oledb datasouce oledb--> sql command to update table1--->oledb destination i need to update my table1 always...please give me some suggestion how to update the table1 with my query...
January 21st, 2011 11:21am

What kind of update do you need to do? Update a single field for every row? Then you can use an Execute SQL Task on the Control Flow with a statement like: "UPDATE dbo.MyTable SET MyField = <some value>". Maybe get fancy with a WHERE clause. BTW, the OLE DB Command on a Data FLow does things typically row by row. Please tell us what kind of update you are doing so we can advise you. We need more infoTodd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2011 11:37am

An Execute SQL Task on the control flow would take that entire statement. But I would consider modifying it a bit: UPDATE [table1] SET BNumber = REPLACE (BNumber, ' ', ' ') WHERE BNumber LIKE '% %' UPDATE [table1] SET BNumber = REPLACE (BNumber, ' ', ' ') WHERE BNumber LIKE '% %' Why are you checking for two-spaces when you then try to replace a field with three?Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
January 21st, 2011 1:45pm

An Execute SQL Task on the control flow would take that entire statement. But I would consider modifying it a bit: UPDATE [table1] SET BNumber = REPLACE (BNumber, ' ', ' ') WHERE BNumber LIKE '% %' UPDATE [table1] SET BNumber = REPLACE (BNumber, ' ', ' ') WHERE BNumber LIKE '% %' Why are you checking for two-spaces when you then try to replace a field with three?Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2011 1:45pm

I am trying to replace 3 spaces with one space and 2 two space with one space.My table has 3 spaces and 2 paces.. thanks it is working ...
January 21st, 2011 2:18pm

I am trying to replace 3 spaces with one space and 2 two space with one space.My table has 3 spaces and 2 paces.. thanks it is working ...
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2011 2:18pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics