Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)

  • RE: the job succeeded .. failed to notify 'vinay' via email..'

    I didnt create alert system do I need to create it ..

    I follow this procedure

    . configure database mail

    . test by sending sample mail

    . change the properties of server...

  • RE: the job succeeded .. failed to notify 'vinay' via email..'

    Hi

    I tested by sending sample email its works fine..

  • RE: help me in selecting two rows

    leave about that

    in below query how to pick up only product code 'C'

    select 1, 'UNLEADED', 'ABD00C', 'C', 'ULOOPPM', 5532.00 union all

    select 2, 'UNLEADED', 'ABD00H', 'H', 'ULOOPPM', 545.00...

  • RE: help me in selecting two rows

    I had one more table called Cost_PID in that one column having Cost I joined this with Product.

    SELECT

    p.Prd_ID,

    p.[Product_name]

    ...

  • RE: help me in selecting two rows

    alright

    I will explain it clearly from that first table unleaded product I want to sum up based on codetype like c,h and l.

    output should be in 3 rows...

  • RE: i want to write a stored procedure to display today and last week sale by tank

    thanks a lot ..

    can I subtract todaysales- weeksale as other column

    many thanks

  • RE: how to sum up

    i GOT IT GROUP BY DILEVERYENTRY.SIMMONPANELID

    THANKS FOR YOUR HELP

    CHEERS.

  • RE: how to sum up

    i TRIED BUT

    i GOT THE SAME RESULT AS

    8500.00

    15515.00

    --

    i WANT TO SEE AS TOTAL BY COMBING TWO RESULT..

    AS 25001.00

    select sum(cost*(deliveryTank.grossVolume)) as Total

    from deliveryEntry

    inner join deliveryMapping on deliveryEntry.ID=deliveryMapping.deliveryID

    inner...

  • RE: how to sum up

    i WANT TO COMBINE DIESEL AND UNLEADED PRODUCT TOTAL

  • RE: how to add hours to day

    this is the query

    select DatePart(hour,Reading_Date) as hour, convert(Date,Reading_Date,103) as date, avg(Fuel_Level)as fuel_level,avg(Fuel_Volume)as fuel_volume from Levels

    where Simmons_PanelID=5479 AND convert(Date,Reading_Date,103)='2012-09-05'

    group by convert(Date,Reading_Date,103),DatePart(hour,Reading_Date)

    order by DatePart(hour,Reading_Date)

    outpur was :

    02012-09-051081.91500010556.072500

    12012-09-051081.45000010550.667500

    22012-09-051080.94000010543.880000

    32012-09-051073.56500010411.868500

    42012-09-051063.21000010234.175500

    52012-09-051056.00500010110.270500

    62012-09-051041.2950009876.589000

    72012-09-051022.1000009611.096000

    82012-09-05998.0900009309.596000

    92012-09-051413.25500013972.345500

    102012-09-051535.83500015867.740000

    112012-09-051516.81500015654.350500

    122012-09-051499.52000015470.388000

    132012-09-051485.86000015313.367000

    142012-09-051469.06500015125.176000

    152012-09-051450.85000014887.597000

    162012-09-051431.66500014641.704500

    172012-09-051407.25500014346.442500

    182012-09-051374.46500013908.481500

    192012-09-051354.15000013639.561000

    202012-09-051344.24000013511.662500

    212012-09-051336.61000013415.504500

    222012-09-051330.81500013343.453500

    232012-09-051327.36000013301.044500

    my question is I want...

  • RE: Each GROUP BY expression must contain at least one column that is not an outer reference.

    ALTER PROCEDURE sp_hrdate1 @red DATETIME AS

    BEGIN

    DECLARE @Reading_Date DATETIME;

    SET @Reading_Date = @red;

    SELECT DATEPART(HOUR,Reading_Date) AS [hour],...

  • RE: Each GROUP BY expression must contain at least one column that is not an outer reference.

    by using your given example I tried

    select convert(varchar(20), Reading_Date), sum(Fuel_Level) as fuel from dbo.Levels

    where convert(date,Reading_Date)=convert(date,getdate())

    group by Convert (varchar(20),Reading_Date)

    order by convert(datetime, convert(varchar(20),Reading_Date))

    it displaying like this :

    Sep ...

  • RE: Each GROUP BY expression must contain at least one column that is not an outer reference.

    column name in levels table is same Reading_Date..

    tried with your give function where class. same output only it showing that day oth hour i need rest of the...

  • RE: Each GROUP BY expression must contain at least one column that is not an outer reference.

    Hi thanks,

    when I executed with modify query i got this as output

    hour ...

  • RE: it returning null

    select dateadd(mm, datediff(mm, 0, @ThisDate) - 1, 0) -- Beginning of previous month

    getdate()-- current date

    my question I want the records from beginning of previous month to today ..wats the...

Viewing 15 posts - 1 through 15 (of 20 total)