Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE TABLE mytable SELECT ... throws exception in PositionCalulator Line 199 #382

Open
BriegerCA opened this issue Mar 8, 2024 · 0 comments

Comments

@BriegerCA
Copy link

SQL Statement works fine with PHPMyadmin or mysqli->query

create table mytable SELECT timeheader.Project, CONCAT('$',timeheader.Expenses) As Expenses, DATE_FORMAT(timedetail.RowDate,'%d/%m/%Y') AS Datum,SEC_TO_TIME(SUM( TIME_TO_SEC( timedetail.Duration ))) AS Hours, CONCAT('$',FORMAT(timeheader.Intern_Rate,2,'en_US')) as 'Intern per Hour', CONCAT('$',FORMAT(SUM( TIME_TO_SEC( timedetail.Duration ))/3600timeheader.Intern_Rate,2,'en_US')) AS 'Internal Cost', CONCAT('$',FORMAT(timeheader.Extern_Rate,2,'en_US')) as 'Extern per Hour', CONCAT('$',FORMAT(SUM( TIME_TO_SEC( timedetail.Duration ))/3600timeheader.Extern_Rate,2,'en_US')) AS 'Extern Cost', CONCAT('$',FORMAT(125,2,'en_US')) as 'Billable per Hour', CONCAT('$',FORMAT((SUM( TIME_TO_SEC( timedetail.Duration ))*(125/3600))+timeheader.Expenses,2,'en_US')) AS 'Billable' FROM timedetail LEFT JOIN timeheader ON timedetail.Identifyer = timeheader.Identifyer group by timeheader.Identifyer, timeheader.Project, timeheader.Intern_Rate, timeheader.Extern_Rate, timeheader.Expenses, timedetail.RowDate order by timeheader.Identifyer, timedetail.RowDate;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant