-2
이 쿼리를 만들려고 시도했지만 구문이 잘못되어 왜 그 이유가 확실하지 않습니다. 슬래시를 이스케이프 처리해야합니까?SQL - 잘못된 구문 - 슬래시가 포함 된 문자열을 변수로 사용
with x as (
select
job_id,
avg_runtime,
id,
row_number() over (partition by ja.job_id order by ja.id desc) rn
from
job_activity as ja
join
job as j
on ja.job_id = j.id
where
j.name in ('/THE/Name/goes/here')
and
ja.avg_runtime <> 0 and
ja.avg_runtime is not null
) select
job_id,
avg_runtime,
id
from
x
where
rn = 1;
''/ THE/Name/goes/here '' – Mihai
그것은 Invaild 열 이름입니다. 이유가 확실하지 않은가요? 그 특정 줄 ON/THE/Name/goes/here ' – user3590149
실제 문자열을 표시하십시오./공백 앞에 숫자가 있습니까? 또한 SQL Server를 추측합니까? – Mihai