05-09-2012 10:43 PM
hello.
i have some problem when i connection with database through this query.
--->
droptableifexiststemp_table;
createtemporarytableifnotexiststemp_table(`date`TIMESTAMPNULL,`data`VARCHAR(3)NULL);
insertintotemp_table(`date`,`data`) select`date`,`be_tq` fromsys_monitoring.imp_linewhereresult='ok'and`date`between'2011-01-01'and'2012-05-05'orderby`date`; selectcount(*)asnum_count, avg(`data`)asnum_avgfromtemp_table;
actually that is works on mysql. but not work on labview
i used lv 8.6.
i will attach sample vi.
thanks.
05-21-2012 07:37 AM - edited 05-21-2012 07:45 AM
Hi,
you have 4 queries : how much times do you execute your db_sample.vi ?
Could you give the error of each execution of your db_sample.vi ?
best regards,
P.S. Is it the open connexion or the execute query that returns an error ?
05-21-2012 09:13 AM
@JSun wrote:
hello.
i have some problem when i connection with database through this query.--->
droptableifexiststemp_table;
createtemporarytableifnotexiststemp_table(`date`TIMESTAMPNULL,`data`VARCHAR(3)NULL);
insertintotemp_table(`date`,`data`) select`date`,`be_tq` fromsys_monitoring.imp_linewhereresult='ok'and`date`between'2011-01-01'and'2012-05-05'orderby`date`; selectcount(*)asnum_count, avg(`data`)asnum_avgfromtemp_table;
actually that is works on mysql. but not work on labview
i used lv 8.6.
i will attach sample vi.
thanks.
You have run on words where there should be spaces separating certain words.
You are using the grave accent ( ` ) when I have only seen regular apostrophes ( ' ) used in SQL queries.
05-22-2012 08:04 PM
Thank for your attention.
I found error's reason. (red qury)
that is only this qury....
>>create temporary table if not exists temp_table(`date`TIMESTAMP NULL,`data`VARCHAR(3)NULL);
Why occur when I want to make table.
actually this qury good work on mysql.
Thanks.