Click here to Skip to main content
15,887,477 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to write insert querry for two tables Pin
Ashfield20-Apr-10 9:03
Ashfield20-Apr-10 9:03 
QuestionSQL Server 2008 R2? Is the upgrade from 2008 free? Pin
DoctorOwl19-Apr-10 14:38
DoctorOwl19-Apr-10 14:38 
AnswerRe: SQL Server 2008 R2? Is the upgrade from 2008 free? Pin
Michel Godfroid20-Apr-10 4:15
Michel Godfroid20-Apr-10 4:15 
QuestionHow to do a quick / generic pivot? Pin
DoctorOwl18-Apr-10 16:25
DoctorOwl18-Apr-10 16:25 
AnswerRe: How to do a quick / generic pivot? Pin
Mycroft Holmes19-Apr-10 17:03
professionalMycroft Holmes19-Apr-10 17:03 
QuestionIs it posible to make several relations between two tables in SQL query ? Pin
H.R17-Apr-10 4:39
H.R17-Apr-10 4:39 
AnswerRe: Is it posible to make several relations between two tables in SQL query ? Pin
PIEBALDconsult17-Apr-10 4:59
mvePIEBALDconsult17-Apr-10 4:59 
AnswerRe: Is it posible to make several relations between two tables in SQL query ? Pin
Stanciu Vlad17-Apr-10 5:33
Stanciu Vlad17-Apr-10 5:33 
Maybe you ar looking for aliases in sql queries?

I think this query is the right one for you:
SELECT 
     person.name as personName, currentCity.title as currentCityTitle, lastCity.title as lastCityTitle
FROM tbl_person as person
     JOIN tbl_city as currentCityON person.CurrentCityID = currentCity.id
     JOIN tbl_city as lastCity ON person.LastCityID = lastCity.id

Note the as keyword used in the querry.
I have no smart signature yet...

GeneralRe: Is it posible to make several relations between two tables in SQL query ? Pin
PIEBALDconsult17-Apr-10 5:36
mvePIEBALDconsult17-Apr-10 5:36 
GeneralRe: Is it posible to make several relations between two tables in SQL query ? Pin
Stanciu Vlad17-Apr-10 5:42
Stanciu Vlad17-Apr-10 5:42 
QuestionProcedure is using server resource but unmanaged how to managed that... Pin
Sasmi_Office16-Apr-10 23:35
Sasmi_Office16-Apr-10 23:35 
AnswerRe: Procedure is using server resource but unmanaged how to managed that... Pin
dan!sh 17-Apr-10 3:44
professional dan!sh 17-Apr-10 3:44 
GeneralRe: Procedure is using server resource but unmanaged how to managed that... Pin
Sasmi_Office17-Apr-10 4:19
Sasmi_Office17-Apr-10 4:19 
GeneralRe: Procedure is using server resource but unmanaged how to managed that... Pin
dan!sh 17-Apr-10 5:45
professional dan!sh 17-Apr-10 5:45 
AnswerRe: Procedure is using server resource but unmanaged how to managed that... Pin
Ashfield17-Apr-10 6:12
Ashfield17-Apr-10 6:12 
QuestionSort Results ignoring symbols like ! ? * " Pin
AlexeiXX316-Apr-10 16:14
AlexeiXX316-Apr-10 16:14 
AnswerRe: Sort Results ignoring symbols like ! ? * " [modified] Pin
Andy_L_J16-Apr-10 18:03
Andy_L_J16-Apr-10 18:03 
GeneralRe: Sort Results ignoring symbols like ! ? * " Pin
AlexeiXX316-Apr-10 18:35
AlexeiXX316-Apr-10 18:35 
GeneralRe: Sort Results ignoring symbols like ! ? * " Pin
Andy_L_J16-Apr-10 19:02
Andy_L_J16-Apr-10 19:02 
AnswerRe: Sort Results ignoring symbols like ! ? * " Pin
Eddy Vluggen17-Apr-10 0:37
professionalEddy Vluggen17-Apr-10 0:37 
Questionhow to read data from pdf file Pin
raghvendrapanda16-Apr-10 1:37
raghvendrapanda16-Apr-10 1:37 
QuestionProblem with attaching a copy of DB which is recieved from another server Pin
ArtemCh15-Apr-10 8:40
ArtemCh15-Apr-10 8:40 
AnswerRe: Problem with attaching a copy of DB which is recieved from another server Pin
ArtemCh15-Apr-10 9:07
ArtemCh15-Apr-10 9:07 
QuestionREADPAST SP Pin
Amr M. K.14-Apr-10 22:04
Amr M. K.14-Apr-10 22:04 
QuestionSystem.Security.SecurityException while accessing report Pin
nizamuddin73314-Apr-10 19:26
nizamuddin73314-Apr-10 19:26 

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.