You can concatenate the fields to do this. Let’s say your Employee table has an ID that is a combo of your SSN and FirstName. The Payrates table as a EmpID field. You would do this.
SELECT *
FROM Employee INNER JONI Payrates
ON Employee.SSN + Employee.FirstName = Payrates.EmpID
@Joes2Pros what software do i need to downlaod this type of software?. I downloaded oracle 11g r2, hoping i will get this exact type of software. I know it's sql plus but i cant download the software(Its already on my start menu under oracle installs). Please help. I'm trying to get ahead of my class before school starts. Thanks.
@Joes2Pros what software do i need to downlaod this type of software?. I downloaded oracle 11g r2, hoping i will get this exact type of software. I know it's sql plus but i cant download the software(Its already on my start menu under oracle installs). Please help. I'm trying to get ahead of my class before school starts. Thanks.
@Joes2Pros what software do i need to downlaod this type of software?. I downloaded oracle 11g r2, hoping i will get this exact type of software. I know it's sql plus but i cant download the software(Its already on my start menu under oracle installs). Please help. I'm trying to get ahead of my class before school starts. Thanks.
Question: If I have multiple fields on one record that all reference the same field in another table (3 employees assigned to one project, for example), how can I join all three fields back to another table? Also, is there a way I can "rename" the fields in the joined query? I need to be able to see which joined employee name fits to which role field in my main table.
Yes Indeed! For the upcoming Launch of the Vol3 later this month there will be a video to cover Primary and Foreign keys. If you are a subscriber you will get the notification as soon as it goes up. Otherwise keep checking back.
Nice tutorial, can you do something about PK and FK followed by Constraints? Will be very helpfull. I understand it from the book but somethimes is better when we see it from professional. Thanks
Yes it looks like you this is a query being used as a derived table. I cover that in Chapter 9 of "SQL Queries Joes 2 Pro" but here is a very quick lesson. If you want a query to act like a table just put in parenthesis and give it a name like this...
SELECT *
FROM (SELECT * FROM Location WHERE Country = ‘UK’) as UKLocation
Here it’s like you are selecting form a UKLocation table which is really derived from the Location table.
Can u help me rewrite or explain this code in sql,i undestand d code but not all of it,also is [select count(*) from tblusers] also the same from [select * from tblusers]? FormAllowed = DBConn.Execute("SELECT Count(*) FROM (tblUsers AS u " & _ "INNER JOIN tblUserGroupPrivileges AS gp ON u.UserGroupID = gp.GroupID) " & _ "INNER JOIN tblForms AS f ON gp.FormID = f.FormID " & _ "WHERE u.[ID] = " & LogInUserID & " AND LCase(f.ObjectName) = LCase('" & FormName & "')").Fields(0).value > 0
Thanks, this tutorial was a last minute god-send for a 'Newbie' like myself.
itchyfangaz 2 months ago
very nice, waiting for more :)
talichp2 2 months ago
Perfect, thank you so much!
ellie3637 3 months ago
Comment removed
sdamoney 5 months ago
Hello 2yung4grey. This video is from the Joes2Pros Vol1 book ISBN-10: 143925317X ISBN-13: 978-1439253175.
To get the right software (costs $50) go the Joes2Pros web site and click "Buy Now". There will be about 10 items on this page, click the grey box.
Joes2Pros 5 months ago
thank you man i love you !!!
Matalic1 8 months ago
Very helpful, thanks so much :)
Shlavlak 8 months ago
You can concatenate the fields to do this. Let’s say your Employee table has an ID that is a combo of your SSN and FirstName. The Payrates table as a EmpID field. You would do this.
SELECT *
FROM Employee INNER JONI Payrates
ON Employee.SSN + Employee.FirstName = Payrates.EmpID
Joes2Pros 11 months ago
@Joes2Pros what software do i need to downlaod this type of software?. I downloaded oracle 11g r2, hoping i will get this exact type of software. I know it's sql plus but i cant download the software(Its already on my start menu under oracle installs). Please help. I'm trying to get ahead of my class before school starts. Thanks.
2yung4grey 5 months ago
@Joes2Pros what software do i need to downlaod this type of software?. I downloaded oracle 11g r2, hoping i will get this exact type of software. I know it's sql plus but i cant download the software(Its already on my start menu under oracle installs). Please help. I'm trying to get ahead of my class before school starts. Thanks.
2yung4grey 5 months ago
@Joes2Pros what software do i need to downlaod this type of software?. I downloaded oracle 11g r2, hoping i will get this exact type of software. I know it's sql plus but i cant download the software(Its already on my start menu under oracle installs). Please help. I'm trying to get ahead of my class before school starts. Thanks.
2yung4grey 5 months ago
Respond to this video... also what book are you referring to?
2yung4grey 5 months ago
Question: If I have multiple fields on one record that all reference the same field in another table (3 employees assigned to one project, for example), how can I join all three fields back to another table? Also, is there a way I can "rename" the fields in the joined query? I need to be able to see which joined employee name fits to which role field in my main table.
Thanks for the videos! These are a big help!
madprophetus 11 months ago
Comment removed
madprophetus 11 months ago
The tool used is called Camtasia 7.0.
Joes2Pros 1 year ago
Excellent presentation and tutorial. What tool you use to create this Video please? Thanks.
maabaig 1 year ago
Yes Indeed! For the upcoming Launch of the Vol3 later this month there will be a video to cover Primary and Foreign keys. If you are a subscriber you will get the notification as soon as it goes up. Otherwise keep checking back.
Joes2Pros 1 year ago
Nice tutorial, can you do something about PK and FK followed by Constraints? Will be very helpfull. I understand it from the book but somethimes is better when we see it from professional. Thanks
jirkovesely 1 year ago
Yes it looks like you this is a query being used as a derived table. I cover that in Chapter 9 of "SQL Queries Joes 2 Pro" but here is a very quick lesson. If you want a query to act like a table just put in parenthesis and give it a name like this...
SELECT *
FROM (SELECT * FROM Location WHERE Country = ‘UK’) as UKLocation
Here it’s like you are selecting form a UKLocation table which is really derived from the Location table.
Joes2Pros 1 year ago
Can u help me rewrite or explain this code in sql,i undestand d code but not all of it,also is [select count(*) from tblusers] also the same from [select * from tblusers]? FormAllowed = DBConn.Execute("SELECT Count(*) FROM (tblUsers AS u " & _ "INNER JOIN tblUserGroupPrivileges AS gp ON u.UserGroupID = gp.GroupID) " & _ "INNER JOIN tblForms AS f ON gp.FormID = f.FormID " & _ "WHERE u.[ID] = " & LogInUserID & " AND LCase(f.ObjectName) = LCase('" & FormName & "')").Fields(0).value > 0
starcatcher164 1 year ago
Thanks
javed4401 1 year ago
hey this is pretty fucking clear!..good job bro!
CamiloSanchez1979 1 year ago
Thanks , clear and simple explanation, but I'm still confused about Natural join, is it the same as inner join?
easa83 1 year ago
Thanks...
uhotatokyahota 1 year ago
SELECT *
FROM employee e, payrates p
WHERE e.empid=p.empid
Is that the same as running the inner join?
Vishalpatel318 1 year ago
That is the old style way and has the same effect today as an inner join in most cases.
Joes2Pros 1 year ago
You are the best. Wonderful tutorial on Joins. Thanks Joes :-)
QTPeLearn 1 year ago 2
You are welcome! Glad you enjoyed it! You can download part of the book for free at the JoesPros web site.
Joes2Pros 1 year ago
Thank you!!!
Joes2Pros 1 year ago
Excellent tutorial, keep up the good work.
ytsatheesh 1 year ago
brilliant tutorial I'd been trying to work out how to use this function for ages very clear and concise
bsandrabr 2 years ago
Very glad to hear that! You comment keeps me motivated to make more good videos.
Joes2Pros 2 years ago