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 |
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-09-11 : 07:50:30
|
hi allI am inserting records from front end into my DB sql server and then i prepare report for it like belowTitle BelongTo Desc ID belongToIDDoc Null AllDoc 1 NullWord 0 All Word 2 1Excel 0 All Excel 3 1Newsletter Null All News 4 NullDaily News 0 Daily 5 4Weekly News 0 Weekly 6 4Now if i insert one new records for Doc i.e. PowerPoint under Doc it will placed below Weekly News.But i want that below Excel title...Title BelongTo Desc ID belongToIDDoc Null AllDoc 1 NullWord 0 All Word 2 1Excel 0 All Excel 3 1PowerPoint 0 PowerPoint 7 1Newsletter Null All News 4 NullDaily News 0 Daily 5 4Weekly News 0 Weekly 6 4what is my select query???select title,BelongTo,Desc,ID,BelongToIDfrom Informationorder by???????? |
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-09-11 : 08:06:54
|
Its not possible to insert the records between a particular records.. Is it Possible to have a column called Orderby and while inserting the records, insert the particular integer value ? and then while selecting order by that "Orders" columns....Chirag |
 |
|
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-09-12 : 00:45:28
|
HI ALL,SELECT rid,nme,pwd,Main,nmd FROM EMPPrid nme pwd Main nmd1 D P NULL NULL2 f p 1 NULL3 v p 1 NULL4 n m NULL NULL5 L N 4 NULL6 P L 4 NULL7 K J 1 NULLI WANT THIS LIKErid nme pwd Main nmd1 D P NULL NULL2 f p 1 NULL3 v p 1 NULL7 K J 1 NULL4 n m NULL NULL5 L N 4 NULL6 P L 4 NULLPLEASE HELP ME OUTT.I.A |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-12 : 00:53:24
|
what is the required ordering sequence ? KH |
 |
|
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2006-09-12 : 01:06:51
|
i want root level and then leaf level alwayslike under column rid and mainrid-------main1---------NULL2---------13---------17---------14---------NULL5---------46---------4T.I.A |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-12 : 01:43:24
|
I assume root level is main and leaf level is rid ?then why the ordering is not like this ?rid-------main1---------NULL4---------NULL2---------13---------17---------15---------46---------4 KH |
 |
|
|
|
|
|
|