hunt69 Posted July 28, 2008 Share Posted July 28, 2008 hi everybody !I try to extract datas from a table A to a table B but I don't want that table B be the same that table A concerning the structure. SO I have a query which calculate value of severals fieldsthat I want to see in the table B. The 2 schemas of table A and B are the following :table A : 2 fields : id et deb_sejourtable B : 7 fields : deb_sejour, year, quarter, month, week_of_year, week_of_month,dayMy query is : "SELECT deb_sejour, extract(YEAR from deb_sejour) as year, extract(QUARTER from deb_sejour) as quarter, extract(MONTH from deb_sejour) as month, extract(WEEK from deb_sejour) as week_of_year, (2 + extract(WEEK from deb_sejour) - extract(MONTH from deb_sejour) * 4) as week_of_month, extract(DAY from deb_sejour) as dayFROM datas_sejour"I have the following error for each fields (except for deb_sejour which is commun to the both tables):Exception in thread "main" java.lang.Error: Unresolved compilation problems: row1.year cannot be resolved or is not a field row1.quarter cannot be resolved or is not a fieldI have a tpostgresqlinput objet and a tpostgresqloutput objet and my query appears in the query parameter of the tpostgresqlimput object.If someone has an idea, that will be great :)Thanks a lot,Regards,Ted Link to comment Share on other sites More sharing options...
riesvantwisk Posted August 1, 2008 Share Posted August 1, 2008 As an attachment can you post your schema?That would help understand what you are doing.. Ries Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now