aspose file tools*
The moose likes JDBC and the fly likes writing ineer query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "writing ineer query" Watch "writing ineer query" New topic
Author

writing ineer query

sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hello
i have a doubt in writing ineer query .This is my query where all the fileds are in the same table named category and this works fine if i manually give the values in () where select PCategory_Id from catgory is written.can any one help me out fast in resolving this???

SELECT Category_Id,Category_Name
FROM category where Category_Id not in (Select Distinct PCategory_Id from category)
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8908
    
    8

Originally posted by sreenath reddy:
Hello
i have a doubt in writing ineer query .This is my query where all the fileds are in the same table named category and this works fine if i manually give the values in () where select PCategory_Id from catgory is written.can any one help me out fast in resolving this???

SELECT Category_Id,Category_Name
FROM category where Category_Id not in (Select Distinct PCategory_Id from category)

Stupid question: Are PCategory_Id and Category_Id different fields or do you have a typo in this query?
Not so stupid question: What database are you using?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: writing ineer query