inserting data for testing
Yeah you can do that as well.Top 1 is to get only Topmost 1 record from the query There is Top n construct in SQL which lets u retrieve top n number of recorsd from the list
View Articleinserting data for testing
Since this was test data, I gave up and removed the primary key constraint and the code ran fine. Now, can I add an identity column to the table and use that as the pk? What does the Top 1 do...
View Articleinserting data for testing
Hi, There is nothing wrong with PKey constraint . however, you can change your select statement with Top 1 Clause. Declare @CTR INT, @CTR2 INTSELECT @CTR = max (OrderID) from ORDDETAILSSELECT...
View Articleinserting data for testing
This gives me the same error on the primary key constraint. Can you look at the table creation and see if there is something wrong with that?thx,Kat
View Articleinserting data for testing
Hi,Get the maximum Id value and start inserting from the next valueDeclare @CTR INT, @CTR2 INTSELECT @CTR = max (OrderID) from ORDDETAILSSELECT @CTR2 = 0WHILE @CTR2 < 3000BEGINSELECT @CTR =...
View Articleinserting data for testing
This is the code I'm using to insert data into a table with data from one table, but changing a single column to prevent duplicates and to increase the number of rows. I know I'm missing something...
View Article
More Pages to Explore .....