Click here to Skip to main content
15,891,529 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to get data from OracleDatabase to SQL Server automaticly Pin
hmanhha2-Mar-16 3:32
hmanhha2-Mar-16 3:32 
GeneralRe: How to get data from OracleDatabase to SQL Server automaticly Pin
CHill602-Mar-16 3:39
mveCHill602-Mar-16 3:39 
GeneralRe: How to get data from OracleDatabase to SQL Server automaticly Pin
hmanhha2-Mar-16 3:53
hmanhha2-Mar-16 3:53 
GeneralRe: How to get data from OracleDatabase to SQL Server automaticly Pin
hmanhha2-Mar-16 23:11
hmanhha2-Mar-16 23:11 
GeneralRe: How to get data from OracleDatabase to SQL Server automaticly Pin
CHill602-Mar-16 23:44
mveCHill602-Mar-16 23:44 
GeneralRe: How to get data from OracleDatabase to SQL Server automaticly Pin
hmanhha3-Mar-16 16:02
hmanhha3-Mar-16 16:02 
QuestionOrder by by using levels using sql Script Pin
indian14322-Feb-16 10:55
indian14322-Feb-16 10:55 
AnswerRe: Order by by using levels using sql Script Pin
Mathi Mani22-Feb-16 14:37
Mathi Mani22-Feb-16 14:37 
Let us assume that you have following data in Employee table
C#
Id	Name	Level
1	zzzz	1
2	nnnn	1
3	dddd	1
4	df	    2
5	bc	    2
6	za	    2
7	az	    2
8	ff	    2
9	ef	    2

and these data in EmployeeRelationShip table
C#
Id	EmployeeId	ManagerId
1	4	        1
2	5	        1
3	6	        2
4	7	        2
5	8	        3
6	9	        3


This query will give results ordered by Manager Name and then by Employee Name:
SQL
select e.Name as ManagerName, b.Name as EmpName from
EmployeeRelationShip r inner join
Employee e on e.Id = r.ManagerId
inner join Employee b on b.Id = r.EmployeeId
order by e.Name, b.Name

And the output will be:
ManagerName	EmpName
dddd	    ff
dddd	    ef
nnnn	    za
nnnn	    az
zzzz	    df
zzzz	    bc


Hope this provides an idea for you to solve your problem.
GeneralRe: Order by by using levels using sql Script Pin
CHill6025-Feb-16 5:07
mveCHill6025-Feb-16 5:07 
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 
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 

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.