I am very new to SQL, I want either integrate the SQL to my c++ code or use c++ output file as an input variable for SQL.
for example i have a query:
use data_set1;
select a.cluster, b.pig, b.PDBgi, b.PDBaccession, a.Seqstar, a.Seqstp
from data_set1..clusterPDBpig a
join pig2PDBgi_acc b
ON a.pig = b.pig where b.PDBaccession = '& 2Y69S'
In which the b.PDBaccession is a 500-1000 list of data, I could put them in a vector in c++ code or an output file...How do I integrate SQL query here? Thanks!
Look up SQL Table Value Parameters.
You can create a user-defined table type parameter like:
Then in your SQL code do something like:
Where @InputData is of type
AccessionDataThe following links provide a bit of information:
http://www.christian-etter.de/?tag=table-valued-parameter
http://www.c-sharpcorner.com/uploadfile/pchandraker/passing-table-valued-parameter-to-stored-procedu-part-1/