ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ok so I have to tell you I'm new to mysql, but it isn't all that hard. But its when problems happen that make it difficult. I'm trying to install this software called ArrayDB from genome.gov and it is build for either sybase or oracle, none of which I want to download and install. So far I've been able to figure how how to get it work work with mysql, the place where I'm running into problems is setting up the tables. For some reason, the following doesn't want to work:
CREATE TABLE adb_intensity (
Exp_id numeric(10,0) not null ,
Cl_id numeric(10,0) not null ,
Spot_id numeric(10,0) not null ,
Top int null ,
Left int null ,
Bottom int null ,
Right int null ,
Bkg_mean_R float null ,
Bkg_mean_G float null ,
Bkg_dev_R float null ,
Bkg_dev_G float null ,
Sample_total_R float null ,
Sample_total_G float null ,
Sample_mean_R float null ,
Sample_mean_G float null ,
Sample_dev_R float null ,
Sample_dev_G float null ,
Sample_size_R int null ,
Sample_size_G int null ,
Ratio float null ,
Cal_Ratio float null ,
Conf_level float null )
I get a syntax error at line 6, which I guess is the "Bottom int null" line. Any ideas?
Hmm I don't think you can use NULL on numeric column types. Try changing the word NULL to ZEROFILL (initialize automatically to 0), or if you dont want them to contain _anything_ drop the NULL keyword entirely.
Also if you try that and you still get errors, I think you might need an argument for your FLOAT types (the precision).
For a 4 digit precision float, try:
col_name FLOAT(4) ZEROFILL,
My advice is to become friendly with DROP TABLE so you can just make smaller tables and drop them to test syntax. I would break that query into a bunch of smaller queries for debugging, find what works/doesnt work, then you can rebuild the big one and build that table you want to build.
Thanks, I don't think I would have found that out about left and right. Anyways, now that I have that fixed, I now have another problem.
CREATE VIEW UniGene
FROM adb_clusters_clones Cc
, adb_clusters Cl
, adb_clones C
WHERE Cl.Clust = Cc.Clust
AND Cc.Cl_id = C.Cl_id
Now this one doesn't want to work.
I check the documentation on CREATE VIEW, but can't seem to find out whats wrong with it except that for some reason it fails at the first line,"Cc.Cl_id"
All the tables are build so I don't think its something with it trying to find something not there.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW UniGene
Tit' at line 1