view has more columns than were specified in the column list.

  • Hi guys,

    I am trying to create new view from current existing view, but i am getting an error as

    "'RelCurrentWh' has more columns than were specified in the column list."

    for more information i am giving my query.

    create VIEW dbo.RelCurrentWh(E) as

    SELECT dbo.DEVICE_DEV.ID_DEV, dbo.READING_DETAIL_RDT.CUSTOM_DESCRIPTION_VAD as 'WH(E)', dbo.DATE_DAT.DATE_DAT AS 'WH(E)_date',

    dbo.TIME_TIM.STRING_TIM AS 'WH(E)_Current_String_time', dbo.REG_INSPHASOR_READ_RIR.ORIGINAL_VALUE_RIR AS 'WH(E)_Current_value'

    FROM dbo.SOCKET_SOC INNER JOIN

    dbo.DEVICE_DEV ON dbo.SOCKET_SOC.SEQNUM_DEV = dbo.DEVICE_DEV.SEQNUM_DEV INNER JOIN

    dbo.READING_DETAIL_RDT ON dbo.SOCKET_SOC.SEQNUM_SOC = dbo.READING_DETAIL_RDT.SEQNUM_SOC INNER JOIN

    dbo.REG_INSPHASOR_READ_RIR ON dbo.READING_DETAIL_RDT.SEQNUM_RDT = dbo.REG_INSPHASOR_READ_RIR.SEQNUM_RDT INNER JOIN

    dbo.DATE_DAT ON dbo.REG_INSPHASOR_READ_RIR.ID_DAT = dbo.DATE_DAT.ID_DAT INNER JOIN

    dbo.TIME_TIM ON dbo.REG_INSPHASOR_READ_RIR.ID_TIM = dbo.TIME_TIM.ID_TIM

    WHERE (dbo.READING_DETAIL_RDT.CUSTOM_DESCRIPTION_VAD = 'Main Energy Current Active energy Q2+Q3 fundamental')

    GROUP BY dbo.DEVICE_DEV.ID_DEV, dbo.READING_DETAIL_RDT.CUSTOM_DESCRIPTION_VAD, dbo.DATE_DAT.DATE_DAT ,

    dbo.TIME_TIM.STRING_TIM , dbo.REG_INSPHASOR_READ_RIR.ORIGINAL_VALUE_RIR.

    plz help with this issue.

    thanx in advance..

  • Check this... may be helpful to you.

    http://www.sqlservercentral.com/Forums/Topic886517-338-1.aspx#bm887407

  • Thanx buddy.

    I got the solution

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply