No announcements
Found 3100426 threads
-
0 Votes
inserting a scope identity in a insert sql statement
Please review this article http://www.mikesdotnetting.com/Article/54/Getting-the-identity-of-the-most-recently-added-record Premature optimization is the ...Answered | 5 Replies | 5557 Views | Created by jihmantiquilla - Saturday, October 17, 2009 12:16 PM | Last reply by Naomi N - Sunday, October 18, 2009 4:31 AM -
0 Votes
@@Identity not returning newly Inserted record ID
This is how it should read: CREATE TRIGGER [dbo].Answered | 9 Replies | 1767 Views | Created by -kit - Wednesday, June 25, 2014 11:58 PM | Last reply by Erland Sommarskog - Thursday, June 26, 2014 9:59 PM -
2 Votes
Identity insert on.
We got solution, as this identity is session level, so if identity insert is on for other table in same session it will not allow you to make identity ...Answered | 5 Replies | 2579 Views | Created by vikas kumar pathak - Saturday, August 3, 2013 10:02 AM | Last reply by Visakh16 - Saturday, September 20, 2014 9:33 AM -
3 Votes
Insert/update Statement on two identical tables
Hope this will help you declare @t1 table (c1 int) insert into @t1 values (1),(2),(3),(4),(5),(6) declare @i int = 3 declare @t2 table (c1 ...Answered | 7 Replies | 4978 Views | Created by pradeepmanne - Saturday, February 18, 2012 5:36 AM | Last reply by pradeepmanne - Saturday, February 18, 2012 12:08 PM -
1 Votes
Get Max ID from Identity column
Yes , SELECT IDENT_CURRENT('#test') AS CurrId always the latest Identity value inserted.Answered | 17 Replies | 20469 Views | Created by khoana - Thursday, November 8, 2012 8:03 AM | Last reply by Olaf Helper - Thursday, November 8, 2012 11:02 AM -
1 Votes
Getting identity value from insert into an updatable view
Plus anyone maintaining an app that sees an insert return a rowset would be puzzled while seeing the app create a temp table, perform the insert, then access the ...Answered | 5 Replies | 5949 Views | Created by Charles Bevitt - Thursday, October 17, 2013 8:16 PM | Last reply by Charles Bevitt - Wednesday, October 23, 2013 4:29 PM -
3 Votes
how to get the identity value immediately after an insert?
You can also try using SCOPE_IDENTITY() to get the last inserted identity value by your session into a table.Answered | 3 Replies | 4033 Views | Created by anandnairv - Saturday, May 29, 2010 10:10 PM | Last reply by Deepak Rangarajan - Sunday, May 30, 2010 4:47 AM -
1 Votes
Multiple Insert Statements
is it possible to run both insert statements in one OleDbCommand?Answered | 19 Replies | 7218 Views | Created by tj49 - Friday, March 20, 2009 10:20 AM | Last reply by tj49 - Monday, March 23, 2009 8:20 AM -
0 Votes
Getting problems with Insert Statement
Getting following error Msg 512, Level 16, State 1, Line 2 Subquery returned more than 1 value.Answered | 9 Replies | 4424 Views | Created by Sumanfbc - Saturday, January 29, 2011 5:46 AM | Last reply by Vishal Gajjar - Saturday, January 29, 2011 10:45 AM -
0 Votes
how to get Id columns of inserted statements and use across different queries
In the insert where you need the identity columns join to the tables that have the needed identity and then use it.Answered | 3 Replies | 963 Views | Created by VijayPrativadi - Thursday, November 5, 2015 6:49 PM | Last reply by Tom Groszko - Friday, November 6, 2015 11:57 AM -
0 Votes
Insert to a table with an ID column which is not an IDENTITY column
I suppose that method is about the same as using an identity.Answered | 10 Replies | 5456 Views | Created by bpeikes - Wednesday, June 30, 2010 5:25 PM | Last reply by bpeikes - Tuesday, July 6, 2010 1:20 PM -
3 Votes
Inserting rows into table with Identity column
Else you will get errors for regular inserts.Answered | 3 Replies | 12510 Views | Created by srinivasa rao yenninti - Monday, December 17, 2012 11:45 AM | Last reply by Manish_Kaushik - Monday, December 17, 2012 3:34 PM -
1 Votes
Identity Column in delete statement
To clear identity counter use: dbcc checkident ('table_name' [ , { NORESEED | { RESEED [ , new_reseed_value ] } } ]) but be ...Answered | 4 Replies | 2163 Views | Created by MSBI_Learner - Wednesday, January 18, 2012 12:23 PM | Last reply by Dmitry Pilugin - Wednesday, January 18, 2012 12:30 PM -
0 Votes
how to get the value of id column which is the identity also... on insert button lick
i have used scpoe_identity() in insert statement ex...insert into xyz values(...)select scope_identity()....and use executescalar() ...Answered | 4 Replies | 2143 Views | Created by .netaholic - Wednesday, July 4, 2012 8:11 AM | Last reply by .netaholic - Wednesday, July 4, 2012 9:11 AM -
0 Votes
create index causes insert statements?
A CREATE INDEX statement spawns an INSERT statement.Answered | 3 Replies | 1044 Views | Created by JRStern - Wednesday, April 17, 2013 8:06 PM | Last reply by Erland Sommarskog - Wednesday, April 17, 2013 9:17 PM -
1 Votes
Identity Insert
Check out the following solution to turn on/off identity insert.Answered | 2 Replies | 4394 Views | Created by Milli_22 - Friday, January 22, 2010 2:01 AM | Last reply by Melissa Suciadi - Friday, January 22, 2010 2:10 AM -
0 Votes
Insert detail with identity
Essentially what you do is simulate an Insert statement with a Merge by using an ON condition that is never true, output the old and new identity values ...Answered | 7 Replies | 2411 Views | Created by DavidLife - Wednesday, December 21, 2011 10:04 PM | Last reply by Naomi N - Thursday, December 22, 2011 1:23 PM -
6 Votes
Error in insert statement
Ok, please paste the exact error message you are getting.Answered | 9 Replies | 6558 Views | Created by rautchetan - Thursday, September 11, 2008 11:09 AM | Last reply by pituach - Thursday, November 14, 2013 2:36 PM -
0 Votes
Handle Identity values in sproc during Insert
Remove ID from the insert statement.Answered | 4 Replies | 4424 Views | Created by arsalan khan - Thursday, April 1, 2010 7:47 PM | Last reply by Naomi N - Thursday, April 1, 2010 8:27 PM -
0 Votes
Inserting existing records to table and getting new identity ID for each row
How do I loop through the 40 records I am attempting to insert into the "Parent" table though?Answered | 3 Replies | 1058 Views | Created by spark29er - Friday, July 25, 2014 10:34 PM | Last reply by Erland Sommarskog - Saturday, July 26, 2014 8:10 AM - Items 1 to 20 of 3100426 Next ›
No announcements