Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: wexas45
  • Content: Threads
  • Order by date
  1. wexas45

    Allocate 0 or 1

    Good Morning All, Test Table Booking Ref No: Booking Ref No 1 L01 1 L01 0 L01 0 L02 1 L03 1 L04 1 L05 1 L04 0 Can anyone kindly assit me on this. I have column on one of my tables with...
  2. wexas45

    COALESCE

    Hello All Can you kindly advice what is wrong with this statement COALESCE (SUM(Cost)) AS Cost, I am getting this error Msg 102, Level 15, State 1, Line 11 Incorrect syntax near ')'.
  3. wexas45

    CASE STATEMENT

    Hello All, can you please help. I am trying to display margin as 0.00 if [GrossProfit] = 0 if not then do the calculation. thanks in advance SELECT *, CASE WHERE [GrossProfit] <> 0 THEN (CONVERT(DECIMAL(17,2),([GrossProfit] / NULLIF(Price,0) * 100.0))) AS Margin ELSE...
  4. wexas45

    Calculate Margin - Group

    Hi, hope every one is doing well. I am new to sql queries. I need to calculate 'MARGIN', which is 'GrossProfit'/[price]*100 and then display the reuslt in the query. Can someone please help me ! SELECT [Booking Product], YEAR([Booking Conf Date]) AS 'BookingYear', COUNT(DISTINCT...

Part and Inventory Search

Back
Top