LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mysql

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.

 

 

0 Kudos
Message 1 of 4
(2,679 Views)

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 ?

V-F
0 Kudos
Message 2 of 4
(2,620 Views)

@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.

 

 

 

 

 

0 Kudos
Message 3 of 4
(2,610 Views)

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.  

0 Kudos
Message 4 of 4
(2,595 Views)