select formatId from tbl_EAI_inboundFileFormats with (nolock) where ownerId = and ownerType = and formatName = 'REDGOLD_SAMPLE_ORDERS_TXT' select ter.name as territoryName, ter.internalSalesID as territoryNo, o.shp_company as ShiptoCompanyName, ltrim( rtrim( o.shp_firstName + ' ' + o.shp_lastName )) as ShipToName, o.shp_address1 as ShipToAddressLine1, o.shp_address2 as ShipToAddressLine2, o.shp_city as ShipToCity, o.shp_state as ShipToState, o.shp_zipcode ShipToZipCode, o.shp_phone as ShipToPhone, o.dtneeded as DateNeeded, rtrim( ltrim( o.rushreason )) as ReasonForRushRequest, o.orderNum as OrderNo, o.orderDate as OrderDate, o.shp_date as DateShipped, rtrim( ltrim( left( l.lineItemComment, 500 ))) SpecialInstructions, l.orderLineItemId as LineId, l.intIdentifier as ItemNo, l.shp_qty QTYFilled, l.shp_qty_unitMsr QTYFilledMeasure, o.orderId from tbl_POS_Orders o inner join tbl_POS_OrderLineItems l on l.orderid = o.orderid inner join tbl_TER_Territories ter on ter.territoryId = o.territoryId and ter.ownerId = o.ownerId and ter.fsl_tablecode = o.fsl_tablecode where o.ownerId = and o.fsl_tablecode = and o.status = 'SHP' and o.shp_date < and o.shp_date >= '09/01/2019' and coalesce( o.processingFlags, '' ) <> 'Sent to Red Gold' order by dateShipped, OrderNo select * from qmd_export where orderNo is not null select ftpDirectory, ftpPassword, ftpServer, ftpUserName from tbl_EAI_InboundFTPSources where ownerId = and ownerType = and ftpUserName = 'redgold'

Development Environment: FTP Transfer Disabled

update tbl_EAI_inboundBatches set fileName = where batchId = and ownerId = and ownerType =

#qmd_export.recordCount# Records Exported

select distinct orderId from qmd_export update tbl_POS_Orders set processingFlags = 'Sent to Red Gold' where ownerId = and fsl_tablecode = and orderId in ( )

No FTP Configuration found for Red Gold, Inc.