SQLTeam.com | Weblogs | Forums

Working this query



I don't know why this query doesn't work for. can you help me please?
thank you

select (200/[traveltimeLkw])*3.6 as v_lkw, [entrytime] ,[vLkwCommon]
FROM [VRZ1010].[vdp_archiv_stv].[dbo].[STV_SVL_Archiv_20175] A
inner join [dbo].[DayCategory] B ON weekdayname='Mo' AND CONVERT(date,A.[entrytime])=B.[day]
where [roadcode]='A23_1' and [from2dk]>=9000 and [to2dk]<=10000


Without Table DDL and sample data, we would just be guessing. What do you mean it doesn't work. Do you get an error? Do you get no result or an undesired result?


I can reformat it so that it's at least legible...

    v_lkw = (200 / traveltimeLkw) * 3.6, 
    VRZ1010.vdp_archiv_stv.dbo.STV_SVL_Archiv_20175 A
    JOIN dbo.DayCategory B
        ON ONVERT(DATE, A.entrytime) = B.day
	weekdayname = 'Mo'
    AND roadcode = 'A23_1'
    AND from2dk >= 9000
    AND to2dk <= 10000;

As far as what may be wrong... No idea, We don't know if you getting errors of an answer you don't agree with.