Matt Nadolny · Jun 21, 2017 go to post

Here is the sql I have attempted

SELECT l.code AS Location_Code,
       l.description AS Location_Name,
       b.code AS Branch_Code,
       b.description AS Branch_Name
FROM LOCATION l,
              branch b ​
WHERE b.code = l.branchcode
  AND b.code = :p_Branch

got and identifier error

Matt Nadolny · Jun 22, 2017 go to post

Here is the response from management studio window

Input (?) encountered after the of the query^

SELECT l.code AS Location_Code,
       l.description AS Location_Name,
       b.code AS Branch_Code,
       b.description AS Branch_Name
FROM LOCATION l,
              branch b ​
?
Matt Nadolny · Jun 22, 2017 go to post

While this works and pops up a screen 

SELECT l.code AS Location_Code,
       l.description AS Location_Name,
       b.code AS Branch_Code,
       b.description AS Branch_Name
FROM LOCATION l,
              branch b 
WHERE b.code = l.branchcode
and b.code=?
order by branch_code, Location_Code

Just want to name prompt so when I create the function it will pass the correct value along

Matt Nadolny · Jun 22, 2017 go to post

I am trying to write a store procedure to create and populate a date table for usage by a report tool. I am using this query to prove out the that I pass prompt value like I do in TSQL or PSQL

Matt Nadolny · Jun 22, 2017 go to post

CREATE function sqlUser.F_TABLE_DATE
(
    ?FIRST_DATE        datetime,
    ?LAST_DATE        datetime
)

Is the beginning of the function