Changeset 7370 for trunk/MagicSoft/Mars
- Timestamp:
- 09/29/05 19:21:55 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7369 r7370 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2005/09/29 Daniela Dorner 22 23 * datacenter/macros/insertsequence.C: 24 - added (macro to insert manually changed sequences into the DB) 25 26 * datacenter/scripts/insertsequences: 27 - added (script to call insertsequence.C) 28 29 * datacenter/scripts/rmlock: 30 - added (script to remove lockfiles after 13 hours) 31 32 20 33 21 34 2005/09/27 Thomas Bretz -
trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C
r7275 r7370 186 186 187 187 //getting # of sequence (in sequDB) between from and to 188 TString query("SELECT fSequenceFirst FROM Sequences WHERE fSequenceFirst ");189 query += Form("BETWEEN %d and %d OR fSequenceLast BETWEEN %d and %d ",190 from, to, from, to);188 TString query("SELECT fSequenceFirst FROM Sequences WHERE (fSequenceFirst "); 189 query += Form("BETWEEN %d and %d OR fSequenceLast BETWEEN %d and %d) AND " 190 "fManuallyChangedKEY=1 ", from, to, from, to); 191 191 192 192 TSQLResult *res = serv.Query(query); … … 212 212 { 213 213 case 0: 214 //FIXME: like this the check is of no use, but when doing it 215 // without the check for manuallychanged, all manually 216 // changed sequences would be deleted 214 217 cout << "found no sequence in Sequ-DB -> check other tables" << endl; 215 218 cout << " deleting every sequence found in Calibration, Star or SequenceProcessStatus between " … … 217 220 218 221 //calibration table 219 query=Form("SELECT fSequenceFirst FROM Calibration WHERE fSequenceFirst BETWEEN %d and %d", from, to); 222 query=Form("SELECT fSequenceFirst FROM Calibration " 223 " LEFT JOIN Sequences ON Calibration.fSequenceFirst=Sequences.fSequenceFirst " 224 " WHERE fManuallyChangedKEY=1 AND fSequenceFirst BETWEEN %d and %d", 225 from, to); 220 226 res = serv.Query(query); 221 227 if (!res) … … 231 237 232 238 //Star table 233 query=Form("SELECT fSequenceFirst FROM Star WHERE fSequenceFirst BETWEEN %d and %d", from, to); 239 query=Form("SELECT fSequenceFirst FROM Star " 240 " LEFT JOIN Sequences ON Star.fSequenceFirst=Sequences.fSequenceFirst " 241 " WHERE fManuallyChangedKEY=1 AND fSequenceFirst BETWEEN %d and %d", 242 from, to); 234 243 res = serv.Query(query); 235 244 if (!res) … … 245 254 246 255 //SequenceProcessStatus table 247 query=Form("SELECT fSequenceFirst FROM SequenceProcessStatus WHERE fSequenceFirst BETWEEN %d and %d", from, to); 256 query=Form("SELECT fSequenceFirst FROM SequenceProcessStatus " 257 " LEFT JOIN Sequences ON SequenceProcessStatus.fSequenceFirst=Sequences.fSequenceFirst " 258 " WHERE fManuallyChangedKEY=1 AND fSequenceFirst BETWEEN %d and %d", 259 from, to); 248 260 res = serv.Query(query); 249 261 if (!res) … … 801 813 802 814 TList sequlist; 803 query=Form("SELECT fSequenceFirst FROM Sequences WHERE %s order by fSequenceFirst",815 query=Form("SELECT fSequenceFirst FROM Sequences WHERE fManuallyChangedKEY=1 AND %s order by fSequenceFirst", 804 816 cond.Data()); 805 817
Note:
See TracChangeset
for help on using the changeset viewer.