0

this is my function:

create function ReservationByClient (@reservation_ID int)
returns table
as

    return(
    select 
    c.client_name,
    c.client_surname,
    c.client_passport,
    r.aptID,
    r.start_date,
    r.end_date,
    r.confirmation
    from tblClient c 
    inner join  tblReservation r on r.client_ID=c.client_ID
    where r.reservation_ID=@reservation_ID)

when invoked with:

select * from dbo.ReservationByClient (602)

it returns only column names and no values in it even there are existing records in both tables, eg. there are three reservations for the same client.

one more question: can i get results only for confirmed reservations (field confirmed is bit type)

thanks

4

0 回答 0