Quantcast
Channel: Find all row and execute code for each row in sql
Browsing all 7 articles
Browse latest View live

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 Article



Re: 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 Article

Re: 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 Article

Re: 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 Article

Re: 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 Article


Find 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 Article

Re: 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
Browsing all 7 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>