Jump to content


  • Posts

  • Joined

  • Last visited

Jackiebalb0a's Achievements


Newbie (1/7)



  1. I am having a small issue translating my excel if statement into a CASE clause. Bellow I have posted my current SQL statement and the IF statement i am trying to fit in. I At the moment i have wrote it into the WHERE Clause but when i run it only returns the data which applies to the product description. Because of the way my where clause is set up it mean i only get half results where as i want it to show if column a does not match criteria then look for certain items in column b IF Statement is =IF(PD="AC","S",IF(PD="CS","S",IF(PD="CA","S",IF(**PT="SS","S"," ")**))) Current SQL SELECT AEOrdersReceivedCurrentQuarter.`Order Company` , AEOrdersReceivedCurrentQuarter.`Sop Order Number` , AEOrdersReceivedCurrentQuarter.`Order Date` , AEOrdersReceivedCurrentQuarter.`Order Method` , AEOrdersReceivedCurrentQuarter.`Payment Method` , AEOrdersReceivedCurrentQuarter.`Product Type` , AEOrdersReceivedCurrentQuarter.`Product Sub Type` , AEOrdersReceivedCurrentQuarter.`Product Description` , AEOrdersReceivedCurrentQuarter.`Quantity Ordered` , AEOrdersReceivedCurrentQuarter.`Product Item Value` , AEOrdersReceivedCurrentQuarter.`Order Count` , AEOrdersReceivedCurrentQuarter.`Order Item Narrative` , AEOrdersReceivedCurrentQuarter.`Product Group` , AEOrdersReceivedCurrentQuarter.`Product Category` FROM AEOrdersReceivedCurrentQuarter.csv AEOrdersReceivedCurrentQuarter WHERE (AEOrdersReceivedCurrentQuarter.`Product Type` = 'Studio Services' OR AEOrdersReceivedCurrentQuarter.`Product Description` IN ('Artwork Charge','Creative Services','Creative Agency','Studio Services') )
  • Create New...