Click here to Skip to main content
15,918,596 members
Home / Discussions / Database
   

Database

 
AnswerRe: Order by by using levels using sql Script Pin
CHill6025-Feb-16 5:05
mveCHill6025-Feb-16 5:05 
QuestionRecursive Common Table Expressions Pin
Amr.Mohammad8720-Feb-16 9:10
Amr.Mohammad8720-Feb-16 9:10 
SuggestionRe: Recursive Common Table Expressions Pin
CHill6020-Feb-16 9:43
mveCHill6020-Feb-16 9:43 
GeneralRe: Recursive Common Table Expressions Pin
Amr.Mohammad8720-Feb-16 11:21
Amr.Mohammad8720-Feb-16 11:21 
GeneralRe: Recursive Common Table Expressions Pin
CHill6020-Feb-16 23:57
mveCHill6020-Feb-16 23:57 
GeneralRe: Recursive Common Table Expressions Pin
Amr.Mohammad8721-Feb-16 7:04
Amr.Mohammad8721-Feb-16 7:04 
GeneralRe: Recursive Common Table Expressions Pin
Jörgen Andersson21-Feb-16 7:31
professionalJörgen Andersson21-Feb-16 7:31 
GeneralRe: Recursive Common Table Expressions Pin
CHill6021-Feb-16 8:04
mveCHill6021-Feb-16 8:04 
This is really something that you need to observe for yourself.

Try adding the following data to my sample table from my solution:
SQL
INSERT "Employees"  VALUES('1Davolio','Nancy','Sales Representative',11),
		('1Fuller','Andrew','Vice President, Sales',NULL),
		('1Leverling','Janet','Sales Representative',11),
		('1Peacock','Margaret','Sales Representative',12),
		('1Buchanan','Steven','Sales Manager',11),
		('1Suyama','Michael','Sales Representative',15),
		('1King','Robert','Sales Representative',15),
		('1Callahan','Laura','Inside Sales Coordinator',11),
		('1Dodsworth','Anne','Sales Representative',15)

Run the query unchanged and observe the results:
2	NULL	Fuller	        Andrew	 Vice President, Sales	  1	0/2
11	NULL	1Fuller	        Andrew	 Vice President, Sales	  1	0/11
10	11	1Davolio	Nancy	 Sales Representative	  2	0/11/10
12	11	1Leverling	Janet	 Sales Representative	  2	0/11/12
14	11	1Buchanan	Steven	 Sales Manager	          2	0/11/14
17	11	1Callahan	Laura	 Inside Sales Coordinator 2	0/11/17
13	12	1Peacock	Margaret Sales Representative	  3	0/11/12/13
1	2	Davolio	        Nancy	 Sales Representative	  2	0/2/1
3	2	Leverling	Janet	 Sales Representative	  2	0/2/3
4	2	Peacock	        Margaret Sales Representative	  2	0/2/4
5	2	Buchanan	Steven	 Sales Manager	          2	0/2/5
8	2	Callahan	Laura	 Inside Sales Coordinator 2	0/2/8
6	5	Suyama	        Michael	 Sales Representative	  3	0/2/5/6
7	5	King	        Robert	 Sales Representative	  3	0/2/5/7
9	5	Dodsworth	Anne	 Sales Representative	  3	0/2/5/9

GeneralRe: Recursive Common Table Expressions Pin
Jörgen Andersson21-Feb-16 21:34
professionalJörgen Andersson21-Feb-16 21:34 
GeneralRe: Recursive Common Table Expressions Pin
CHill6021-Feb-16 22:19
mveCHill6021-Feb-16 22:19 
GeneralRe: Recursive Common Table Expressions Pin
Jörgen Andersson21-Feb-16 22:30
professionalJörgen Andersson21-Feb-16 22:30 
GeneralRe: Recursive Common Table Expressions Pin
Amr.Mohammad8722-Feb-16 10:28
Amr.Mohammad8722-Feb-16 10:28 
QuestionEntity Pin
mohsen47319-Feb-16 21:03
mohsen47319-Feb-16 21:03 
QuestionSQLPrepare error: [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. Pin
Member 1233569519-Feb-16 17:48
Member 1233569519-Feb-16 17:48 
Questionhow to set/retrieve data directory and index directory of a table of mysql database Pin
CanadaProgrammer16-Feb-16 23:37
CanadaProgrammer16-Feb-16 23:37 
AnswerRe: how to set/retrieve data directory and index directory of a table of mysql database Pin
Richard MacCutchan16-Feb-16 23:54
mveRichard MacCutchan16-Feb-16 23:54 
QuestionHow to setup a local database for my application Pin
Theo Buys16-Feb-16 22:55
Theo Buys16-Feb-16 22:55 
AnswerRe: How to setup a local database for my application Pin
Richard MacCutchan16-Feb-16 23:52
mveRichard MacCutchan16-Feb-16 23:52 
GeneralRe: How to setup a local database for my application Pin
Theo Buys17-Feb-16 5:31
Theo Buys17-Feb-16 5:31 
GeneralRe: How to setup a local database for my application Pin
Richard MacCutchan17-Feb-16 5:42
mveRichard MacCutchan17-Feb-16 5:42 
GeneralRe: How to setup a local database for my application Pin
Theo Buys17-Feb-16 7:24
Theo Buys17-Feb-16 7:24 
QuestionWhat is wrong with my query? Pin
samflex11-Feb-16 4:57
samflex11-Feb-16 4:57 
AnswerRe: What is wrong with my query? Pin
Richard Deeming11-Feb-16 8:52
mveRichard Deeming11-Feb-16 8:52 
AnswerRe: What is wrong with my query? Pin
ZurdoDev11-Feb-16 9:19
professionalZurdoDev11-Feb-16 9:19 
Questiondata warehouse for hospital Pin
mohammed.alchalabee9-Feb-16 3:11
mohammed.alchalabee9-Feb-16 3:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.