3 Replies - 700 Views - Last Post: 27 July 2012 - 09:25 AM Rate Topic: -----

#1 abhishekgaur  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-July 12

Query solution

Posted 26 July 2012 - 04:53 AM

create table DATA (IMAGE_ID ,IMAGETimestamp, IMAGEFilePath );

create table FRAME(FrameID,VideoStartTime, VideoEndTime,VideoFile path);



here the Image id is primary key and frame ID is foreign key
i want to join the tables in such a way that FrameID did not come in the joined table as the entries of the Imageid and frame id are same i applied the query by left outer join but it is huge can someone help to reduce the size...

select DATA.Img_ID,DATA.Img_Type,DATA.Img_FilePath,DATA.Img_TimeStamp,DATA.Img_Lat,DATA.Img_long,DATA.Img_Country,DATA.Img_City,DATA.Img_Landmark,
  DATA.MPEG7FILEPATH,DATA.Img_Title,DATA.Img_Creator,DATA.Img_Description,DATA.Img_Keyword,DATA.Img_Genre,DATA.Img_Rate,DATA.Img_Copyright,
  FRAME.VIDEOSTARTTIME,FRAME.VIDEOENDTIME,FRAME.VIDEOFILEPATH from DATA left join FRAME on DATA.Img_ID=FRAME.FRAMEID;


This post has been edited by baavgai: 26 July 2012 - 05:36 AM
Reason for edit:: tagged. Didn't really help.


Is This A Good Question/Topic? 0
  • +

Replies To: Query solution

#2 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 495
  • View blog
  • Posts: 3,300
  • Joined: 12-January 10

Re: Query solution

Posted 26 July 2012 - 05:07 AM

put code in code tags [code]

most of your code runs off the page and illegible
Was This Post Helpful? 0
  • +
  • -

#3 S-John  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 51
  • Joined: 13-July 12

Re: Query solution

Posted 27 July 2012 - 09:19 AM

Can't you do a "Select * FROM FRAME WHERE Image.IMAGE_ID = Frame.FRAMEID"? or something along those lines. I am not wholly familiar with the syntax.
Was This Post Helpful? 0
  • +
  • -

#4 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 495
  • View blog
  • Posts: 3,300
  • Joined: 12-January 10

Re: Query solution

Posted 27 July 2012 - 09:25 AM

in your select statment you have a bunch of columns that are not listed in your tables. In order to get help you need to decide what info belongs in the tables and show us your real tables. We are not here to guess what is supposed to be in the tables and what is not.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1