Saturday 15 January 2011

sql server - sql query problem, manipulate data -


I have archived the archive which will tell us whether a new check is to be printed. Now I have to manipulate the data in the database table so that at least one check can be printed. I did not write this question. I tried, but at least one check was not printed on me. Can somebody help me out. Here is stored PROC

  Create process [proc_1250_SELCashiersChecksForPrint] Select t_DATA_CashiersChecksIssued.ControlNbr, t_DATA_CashiersChecksIssued.Audit_DateAdded, t_DATA_CashiersChecksIssued.BatchNbr, t_DATA_CashiersChecksIssued.SerialNbr, t_DATA_CashiersChecksIssued.CheckRTN, t_DATA_CashiersChecksIssued.CheckAccountNbr, t_DATA_CashiersChecksIssued.Amount as, t_DATA_CashiersChecksIssued.DateIssued, t_DATA_CashiersChecksIssued.Payee, t_DATA_CashiersChecksIssued.Address, t_DATA_CashiersChecksIssued.City, t_DATA_CashiersChecksIssued.State, t_DATA_CashiersChecksIssued.Zip, t_DATA_Reclamation.ClaimId, t_DATA_Reclamation.NoticeDate, t_DATA_Reclamation.FirstName, t_DATA_Reclamation.MiddleName, t_DATA_Reclamation.LastName, t_DATA_Reclamation.ClaimTotal , T_PCD_Claimant As the name of the agency, on t_DATA_CashiersChecksIssued.INDANTITYCOL on t_DATA_CashiersChecksInsued INNER JOINT_DAT A_Reclamation t_DATA_CashiersChecksIssued.ControlNbr = t_DATA_Reclamation.ControlNbr interiors include t_DATA_Reclamation.ClaimantCode = t_PCD_Claimant.ClaimantCode t_PCD_Claimant wherever (t_DATA_CashiersChecksIssued.SerialNbr IS NULL) and (t_DATA_CashiersChecksIssued.DateIssued zero) By t_DATA_CashiersChecksIssued.Audit_DateAdded ASC command, visit t_DATA_CashiersChecksIssued.ControlNbr ASC  

`

Assume that the table has data, it will be updated for the first time row

JOIN
  UPDATE TOP (1) SET t_DATA_CashiersChecksIssued SerialMbr = zero, DataIssued = zero t_DATA_CashiersChecksIssued within Join t_DATA_Reclamation on t_DATA_CashiersChecksIssued.ControlNbr = t_DATA_Reclamation.ControlNbr Insider on t_DATA_Reclamation.ClaimantCode = t_PCD_Claimant.ClaimantCode t_PCD_Claimant from  

No comments:

Post a Comment