mysql - MS Access equivalent query -


I am trying to write a query that I know is compatible with MS Access from MySQL. This is a programming assignment, so I do not expect to answer directly, but I do not know the MS Access version of SSL very well. I wrote MySQL myself, and tested it to work. When I realized that the query needed to work for it instead of MS Access, here is the known code:

  SELECT` D`. RERECNUM`, `R` .RENT_DATE , `D` VIDNN````` MOVIE_TITLE`, `D` DETel DDATT, `D``t`t` DTR & DT``D DTEERAI FI, `D`. DETEELR EDD DETERDADAT 'DAIS_LAT' as `Statentant` as` D` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` ` `` `` `` `` `` `` `` `` `` `` `` `` `` ` MOVIONA 'D`. DETELLTDTUTRDDT-`D`. DETERRDDAT` & gt; Order by 0```````````````````````` and 'M';  

I am trying to convert to MS Access SQL, but I still do not get it. Here's the most recent effort [DC] [D] [D]. [RITNDT], [R]. [RCDADT], [D]. [VID_NUM], [M]. [MOVIE_TITLE], [D]. [DETAIL_DUEDATE] [D]. [DETAIL_RETURNDATE], [D]. [DETAIL_FEE], [D]. [DETAIL_RETURNDATE] - [D]. [DETAIL_DUEDATE] AS [DAYS_LATE] as FOR [DETAILRENTAL] [D] Inner Join ([Rent]] as [Join] [[Video] AS [V] Inner Join [Movie] AS [Em] On [ V] [MOVIE_NUM] = [M]. [MOVIE_NUM]] [D]. [VID_NUM] = [V]. [VID_NUM]) [D]. [RENT_NUM] = [R]. [RENT_NUM] WHERE [D] [DETAIL_RETURNDATE] - [D]. [DETAIL_DUEDATE] & gt; 0 order by [R]. [RENT_NUM], [M]. [MOVIE_TITLE];

The error I get is in the JOIN action in syntax error. I know what that means, but I do not know MS Access' SQL error.

I had to write some access questions, so I just got the syntax described by official documents. To know that there was a syntax error, you need to wrap JOIN with the bracket for the query to work, but every ON statement should still be within each set of brackets. , Which is not out. It should do the trick.

  SELECT [D]. [RENT_NUM], [R]. [RENT_DATE], [D]. [VID_NUM], [M]. [MOVIE_TITLE], [D]. [DETAIL_DUEDATE], [D]. [DETAIL_RETURNDATE], [D]. [DETAIL_FEE], [D]. [DETAIL_RETURNDATE] - [D]. [DETAIL_DUEDATE] as [DAYS_LATE] FROM ((([[D] INNER JOIN [rental] AS [R] ON [D]. [RENT_NUM] = [R]. [RENT_NUM] INNER JOIN [Video] AS [ V] ON.DVID_NUM = [V]. [VID_NUM]]] [INN] [film] AS [M] ON [V]. [MOVIE_NUM] = [M]. [MOVIE_NUM] WHERE [D]. [DETAIL_RETURNDATE] - [D]. [DETAIL_DUEDATE]> Order [R] by [RENT_NUM], [M]. [MOVIE_TITLE];  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -