set verify off set serveroutput on accept p_ename prompt'Please enter the employee name:' accept p_cname prompt'Please enter the customer name:' accept p_typeno prompt 'Please enter the call type number:' accept p_comp prompt'Please enter the company name:' DECLARE v_callno number(3); --v_date :=sysdate; --v_cname:='&p_cname'; v_ename staff.name%type:='&p_ename'; --v_typeno :='&p_typeno'; --v_comp :='&p_comp'; v_support staff.job%type; BEGIN v_callno :=sql%rowcount; select job into v_support from staff where &p_typeno=30 and v_ename in('JAMAL','KAMAL','WAEL I.','WAEL S.','AJI'); INSERT INTO call_info values(v_callno,sysdate,'&p_cname','&p_ename','&p_typeno','&p_comp','v_s uppo rt'); COMMIT; END;
This would be more appropriately asked in a development forum related to the language you are using. I generically understand the code, but I have no idea what you are trying to do or where the data comes from. It is not a problem with SQL Server.
For More Information
- Dozens more answers to tough SQL Server questions from Michael Hotek are available here.
- The Best Microsoft SQL Server Web Links: tips, tutorials, scripts, and more.
- The Best SQL Web Links
- Have a SQL Server tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical SQL Server questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Microsoft SQL Server Installation
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.