mysql - SQL Subquery issue 3 -


i have issue sql code.

when run code i'm getting such error mesage:

**

subquery returned more 1 value. not permitted when subquery follows =, !=, <, <= , >, >= or when subquery used expression.

**

i don't know how correct code run it?

can somebothy @ , me it?

thank help,

select dbo.fra$.[guid], dbo.fra$.[last name],   dbo.fra$.[first name], dbo.fra$.[hr manager last name],   dbo.fra$.[hr manager first name], (select dbo.fra$.[business email address] dbo.fra$ t t.[hr manager id] = t.[emplid]) [hr manager e-mail],  dbo.loc.descr [company name], dbo.fra$.[location code],  dbo.loc.[address], dbo.loc.postal, dbo.loc.city, dbo.fra$.[national id], dbo.fra$.[current employee class desc] [current empl class],  dbo.fra$.[contract type description] [contract type], dbo.fra$.[business title],  case dbo.fra$.[current employee class desc] when 'operator' 10 when 'clerical worker' 22 when 'technician' 32 when 'supervisor' 33 when 'manager&engineer' 54 end [salary brutto],  format(dbo.fra$.[birthdate],'yyyy-mm-dd') [birth date], format(dbo.fra$.[last start date],'yyyy-mm-dd') [hire date]  dbo.fra$    inner join dbo.loc   on dbo.fra$.[location code] = dbo.loc.[location]  [hr status] in ('international assignment','active','leave of absence'); 

try replace

select dbo.fra$.[business email address] dbo.fra$ t t.[hr manager id] = t.[emplid] 

with

select top 1 t.[business email address] dbo.fra$ t [hr manager id] = t.[emplid] 

it take 1 row rows returned subquery


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -