Viewing 15 posts - 22,006 through 22,020 (of 26,490 total)
foxjazz (3/13/2009)
Excatly my point.... So why doesn't t-sql accomodate sets?
Why would I need a cursor to do updates like ?
foreach(select * from table)
{
insert into othertable (field) value(myfield) ?...
March 13, 2009 at 3:09 pm
foxjazz (3/13/2009)
Yes shortening of stuff...
March 13, 2009 at 3:01 pm
I'd say minimal difference, but I'd personally use the second option.
March 13, 2009 at 2:40 pm
foxjazz (3/13/2009)
foreach( select myfield from tbl where myotherfield > 3)
{
insert into myothertable (myotherfield) values (myfield)
}
I think...
March 13, 2009 at 2:37 pm
Your complaints are a bit of the mark IMHO. There is nothing wrong with the sematics of T-SQL. It's just different the C# just like C# is different...
March 13, 2009 at 2:34 pm
You can help us help you by reading the first article I have linked in my signature block below that regarding asking for assistance.
March 13, 2009 at 2:25 pm
So, what don't you like about T-SQL? I find it quite easy to work with and haven't had any problem moving from a 3GL language (COBOL) to it.
The paradigm...
March 13, 2009 at 2:13 pm
After stopping your code (still hadn't finished after 55 minutes), I reran the code I showed above and here are the results.
My code:
SQL Server Execution Times:
CPU time...
March 13, 2009 at 1:29 pm
Now, you may be askiing "Why?" Check the second article (Running Totals and its variations) I have linked below in my signature block. If it has been republished...
March 13, 2009 at 1:21 pm
Manju (3/13/2009)
March 13, 2009 at 1:14 pm
Manju (3/13/2009)
With the sample dataset, the execution plan seemed far simpler - you may want to give this a try too.
update t set
...
March 13, 2009 at 12:43 pm
Since this is a school project, it is best if you do your initial research first. As you find the various answers to your initial questions and need clarification...
March 13, 2009 at 12:07 pm
ramadesai108 (3/13/2009)
March 13, 2009 at 11:12 am
ramadesai108 (3/13/2009)
The index is on the intID column. here is the script to create table and add data
create table Clients
(
intID INT,
...
March 13, 2009 at 10:34 am
Please post the DDL for your table, sample data (as INSERT statements that can be cut and paste into SSMS and run) including both numeric and non-nummeric client ids, and...
March 13, 2009 at 9:51 am
Viewing 15 posts - 22,006 through 22,020 (of 26,490 total)