select 1 from rpinterface_ria (nolock) where rtrim(ltrim(storecode))=@fromstore and rtrim(ltrim(DeliveryLocation))=@tostore and cast(isnull(shipmentDate,DeliveryDate) as datetime)=@shipmentdate and productcode is not null)     select top 1 @season_id=season_id from season

解决方案 »

  1.   

    select top 1 @season_id=season_id from season这样的语句是什么意思
    --把第一條記錄的season_id賦值@season_id變量select 1 
    from rpinterface_ria (nolock) 
    where rtrim(ltrim(storecode))=@fromstore and rtrim(ltrim(DeliveryLocation))=@tostore --去掉DeliveryLocation、storecode的前后空格
    and cast(isnull(shipmentDate,DeliveryDate) as datetime)=@shipmentdate and productcode is not null)    这样的语句是什么意思
    --shipmentDate格為null時等於DeliveryDate列再轉換為Datatime類型后是否等於@shipmentdate,並且 productcodeg列不為null
      

  2.   

    select top 1 @season_id=season_id from season这样的语句是什么意思
    --把第一條記錄的season_id賦值@season_id變量select 1 
    from rpinterface_ria (nolock) 
    where rtrim(ltrim(storecode))=@fromstore and rtrim(ltrim(DeliveryLocation))=@tostore --去掉DeliveryLocation、storecode的前后空格
    and cast(isnull(shipmentDate,DeliveryDate) as datetime)=@shipmentdate and productcode is not null)    这样的语句是什么意思
    --shipmentDate格為null時等於DeliveryDate列再轉換為Datatime類型后是否等於@shipmentdate,並且 productcodeg列不為null
    怎么发了2个帖子