Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
devisetti
Starting Member
30 Posts |
Posted - 2008-04-03 : 09:30:53
|
| Guys I have got a table with 42 lakh records.I am trying to insert into the target table by using selectand using like keyword. It is inserting records randomly. But need to insert records in sequence which should be ordered by. The problem here Iam not able to use order by because of 42 lakh records. Any possible solution for this is appreciated.Following is the example.-------insert into target tableselect * from test_policy where policynumb like '[cdklnqtswxyabeghjmpr1z]%'this statment is used in the stored procedurethese records should be sorted out while insertion. But it is inserting randomly.thanks in advance |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-04-03 : 09:34:20
|
| Which column decides order of insertion?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
pravin14u
Posting Yak Master
246 Posts |
Posted - 2008-04-03 : 09:37:42
|
| Even if you insert in some order, the data would be stored in a random order in the destination table (test_policy ). So using Order by in your select query will not do any wonders.Can you tell why you need the data to be inserted in Order?Prakash.PThe secret to creativity is knowing how to hide your sources! |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-04-03 : 09:42:15
|
| and what's lakh?Em |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-04-03 : 09:44:13
|
| 1 Order of the data in a table doesnt matter. It should be ordered during selection2 Lakh is Indian method of expressing 100,000MadhivananFailing to plan is Planning to fail |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-04-03 : 09:44:38
|
quote: Originally posted by elancaster and what's lakh?Em
In Indian context, 1 Lakh = 100KSo basically OP means 4.2 million records. Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-04-03 : 09:48:37
|
i feel un-worldly-wise but i do know what daps are, and frequently run up our snicket in them Em |
 |
|
|
tosscrosby
Aged Yak Warrior
676 Posts |
Posted - 2008-04-03 : 11:55:06
|
| elancaster - OK I'll bite..what are daps? And what is a snicket? Your comment sounds painful: frequently run up our snicket in them - ouch!!!Terry |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-04-03 : 13:59:41
|
lol daps are pumps / plimsoles... limited to round southwest of the UKa snicket is a footpath, specifically through housing estates... limited to round yorkshire i guess (north England)Em |
 |
|
|
|
|
|