Click here to Skip to main content
15,896,480 members
Home / Discussions / Database
   

Database

 
QuestionOracle vs. SQL Server Pin
Paladin200017-Mar-11 9:41
Paladin200017-Mar-11 9:41 
AnswerRe: Oracle vs. SQL Server PinPopular
Mycroft Holmes17-Mar-11 12:54
professionalMycroft Holmes17-Mar-11 12:54 
AnswerRe: Oracle vs. SQL Server Pin
PIEBALDconsult17-Mar-11 18:02
mvePIEBALDconsult17-Mar-11 18:02 
JokeRe: Oracle vs. SQL Server Pin
Bernhard Hiller20-Mar-11 21:45
Bernhard Hiller20-Mar-11 21:45 
GeneralRe: Oracle vs. SQL Server Pin
PIEBALDconsult21-Mar-11 3:17
mvePIEBALDconsult21-Mar-11 3:17 
AnswerRe: Oracle vs. SQL Server Pin
Prasanta_Prince13-Apr-11 1:53
Prasanta_Prince13-Apr-11 1:53 
AnswerRe: Oracle vs. SQL Server Pin
S Douglas14-Apr-11 4:41
professionalS Douglas14-Apr-11 4:41 
QuestionTrouble with LEFT JOIN SQL Statement Pin
Dominick Marciano17-Mar-11 6:31
professionalDominick Marciano17-Mar-11 6:31 
Current we have a database that has two tables "order status" and "lead_free_certs". For each record in "order status" there may be 0 to many records in the "lead_free_certs" table. I'm trying to load a specific record from "order status" and if there is a matching record in "lead_free_certs" (based on project number), the most recent record in "lead_free_certs" based on the certificate number. I'm using VS2008 and I'm connecting to 2005 SQL Server. The SQL statement I have is:
SELECT * FROM [Order Status] LEFT JOIN Lead_Free_Certs ON [Order Status].[Project #] = Lead_Free_Certs.[Project Num] WHERE ([Order Status].[Project #] = " & projectnumber & ") ORDER BY Lead_Free_Certs.[Cert Num] DESC


The "projectnumber" variable is passed as an argument to the function. When I run this command no rows are returned. However if I want to load records only from the "order status" table then the following SQL statement works:
"SELECT * FROM [Order Status] WHERE [Project #] = " & projectnumber


So I know it is a problem with my LEFT JOIN statement. Any help would be greatly appreciated since this is the first time I'm trying to use JOIN statements.
AnswerRe: Trouble with LEFT JOIN SQL Statement Pin
Chris Meech17-Mar-11 6:46
Chris Meech17-Mar-11 6:46 
GeneralRe: Trouble with LEFT JOIN SQL Statement Pin
Dominick Marciano17-Mar-11 6:53
professionalDominick Marciano17-Mar-11 6:53 
GeneralRe: Trouble with LEFT JOIN SQL Statement Pin
Chris Meech17-Mar-11 7:01
Chris Meech17-Mar-11 7:01 
GeneralRe: Trouble with LEFT JOIN SQL Statement Pin
suddip19-Mar-11 22:02
suddip19-Mar-11 22:02 
GeneralRe: Trouble with LEFT JOIN SQL Statement Pin
Dominick Marciano17-Mar-11 6:58
professionalDominick Marciano17-Mar-11 6:58 
GeneralRe: Trouble with LEFT JOIN SQL Statement Pin
Chris Meech17-Mar-11 7:02
Chris Meech17-Mar-11 7:02 
QuestionSSIS re-validation of metadata Pin
Mel Padden17-Mar-11 5:46
Mel Padden17-Mar-11 5:46 
QuestionCross-Tabulations with multiple tables Pin
CodingLover16-Mar-11 22:53
CodingLover16-Mar-11 22:53 
AnswerRe: Cross-Tabulations with multiple tables Pin
Mycroft Holmes17-Mar-11 1:41
professionalMycroft Holmes17-Mar-11 1:41 
GeneralRe: Cross-Tabulations with multiple tables Pin
CodingLover21-Mar-11 2:20
CodingLover21-Mar-11 2:20 
GeneralRe: Cross-Tabulations with multiple tables Pin
Mycroft Holmes21-Mar-11 3:39
professionalMycroft Holmes21-Mar-11 3:39 
AnswerRe: Cross-Tabulations with multiple tables Pin
Chris Meech17-Mar-11 3:19
Chris Meech17-Mar-11 3:19 
GeneralRe: Cross-Tabulations with multiple tables Pin
CodingLover21-Mar-11 2:21
CodingLover21-Mar-11 2:21 
Questionmysql select from multiple tables / databases Pin
piticcotoc15-Mar-11 21:23
piticcotoc15-Mar-11 21:23 
AnswerRe: mysql select from multiple tables / databases Pin
Mycroft Holmes16-Mar-11 1:10
professionalMycroft Holmes16-Mar-11 1:10 
GeneralRe: mysql select from multiple tables / databases Pin
piticcotoc16-Mar-11 2:44
piticcotoc16-Mar-11 2:44 
AnswerRe: mysql select from multiple tables / databases Pin
jschell16-Mar-11 8:38
jschell16-Mar-11 8:38 

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.