Re: Find all row and execute code for each row in sql
To better present your T-SQL question, you should provide your table structure (DDL) along with some sample data and expected result.In your case, you need to let us know your Chart and Update to which...
View ArticleRe: Find all row and execute code for each row in sql
Have you tried using cursor? Using cursor you can loop through the selected rows and perform required operation one by one.Check this out for...
View ArticleRe: Find all row and execute code for each row in sql
Hello Farzaneh_t,Since I don't know what you are updating I cant give you exact sql but you need to USE Update with select statement,Please see:...
View ArticleRe: Find all row and execute code for each row in sql
but i want , first select all KID and then update each record whit KID.
View ArticleRe: Find all row and execute code for each row in sql
You can use multiple SQl Statements separated by semikolon.SELECT KID FROM Chart; UPDATE Chart set KID = 10;
View ArticleFind all row and execute code for each row in sql
I have function like this in asp.net :DataTable dt = dal.ExecuteDataTable(CommandType.Text, "SELECT KID FROM Chart", new SqlParameter[] { }); for (int i = 0; i < dt.Rows.Count; i++) {...
View ArticleRe: Find all row and execute code for each row in sql
Update othertable set Kid = chart.Kid FROM [othertable] INNER JOIN chart ON [othertable].columnname = chart.columnname
View Article
More Pages to Explore .....