All pastes #262069 Raw Edit

huhlig

public text v1 · immutable
#262069 ·published 2006-11-30 03:28 UTC
rendered paste body
"SELECT "+
	        	 	"skey AS store_num, "+ 
	             	"rpo AS invoice_num, "+ 
	             	"(CASE WHEN RTRIM(wtype)=\'Warranty\' THEN warranty_type+\' \'+wtype ELSE wtype END) AS ordertype, "+
	             	"[wtype], "+
	             	"machine_type, "+
	             	"modelnumber, "+
	             	"serialnumber, "+
	             	"productserial, "+
	             	"machinebrand, "+
	             	"convert(varchar(10),rdat,101) AS rdat, "+
	             	"convert(varchar(10),complete_date,101) AS cdate, "+
	             	"RTRIM(pu.fname)+\' \'+RTRIM(pu.lname) AS custName, "+
	             	"complete_date, "+
	             	"pdesc, "+
	             	"drepairdesc, "+
	             	"special_ins_tech, "+
	             	"techdiag "+
	             "FROM "+ 
	             	"ps_workorder wo, "+
	             	"ps_workorder_users pu, "+
	             	"STORE s, "+
	             	"tms_user T "+ 
	             "WHERE "+ 
	             	"pu.user_id=wo.owner_id AND "+ 
	             	"s.store_id=wo.store_id AND "+
	             	"wo.owner_id=pu.user_id  AND "+
	             	"s.stech_id*=t.tms_user_id AND "+
	     	    	"wo.wtype!=\'On Site\'  AND "+
	             	"wo.complete_date IS NULL AND "+
	     	    	"wo.cancel_wo IS NULL AND "+
	             	"s.skey="+Store+" "+