I have two tables.. I want to update one table with the count of each colume from the pervious table. I have been able to do it using the query bulider and when ran, it works but I want to take the SQL statment and copy it into my moduel however it won’t work. It will not let me format the SQL statment and remove put the whole statement on one line. I’m new at this so I don’t really understand why I am unable to do this. Below is the code I have. I also have done this with other update querys that I didn’t count, just simply copied from one table to another and that worked fine.
I use db.execture "the sql stament" because the query is so long it copies it one two lines and when I try and make it all one one line it doesn’t work. Its at the point where its (SELECT COUNT(BlockRegenTemp From BLOCKNUM) AS CountOfBLOCKNUM.
Thanks
Similar:
- How to get a total days count Using MySQL & SQL Server ID sDate 001 03/06/2010 002 07/08/2010 .... .... sDate Datatype is varchar Format mm/dd/yyyy I want to take the date...
- how do i count the total number of lines of code i wrote in vb.net? i wrote an application in VB.NET and since i charge by the line, i would like to calculate how many lines i wrote. i have...
- Tyoe conversion error in update query Hi, I am running an update query where i am basically stripping of the last digit of a data. Thus for example: 20110068876v 180068877v should...
- Please will you help tune a 7-table-join mysql count query where tables contain 30,000+ rows? I have an sql query that counts the number of results for a complex query. The actual select query is very fast when limiting to...
- How to display total record count against models in django admin Is there a neat way to make the record/object count for a model appear on the main model list in the admin module? I have...
Tags: colume, sql statment, two tables