SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Help needed Creating Procedure in Sql Server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 06/27/2013 :  08:20:52  Show Profile  Reply with Quote
Can anyone help me with a small procedure I have to write?

Requirement to create Stored Procedure :
1. Create tables
----------- this is done------

Fill the data in those tables
------------this is also done----

Create "Source_table.tx"t file with table names and place them in any location.
------------this is also done----

write a procedure to read the above file "Source_table.txt" and it should read the tables name 1 by 1 which performs a simple operation inside SP -->

Select * from @Table_Name

Also, it should check if the .txt file is exisiting or not.

If exists then Read the file and execute the SP.
SP does this :
Select * from A1
Select * from A2
Select * from B1
Select * from B2

After that, write an output file with the counts of records to the same location where our Source_table.txt exists .

If doesnt exist then write to a .txt file that "File name and Location doesnt exist"

Edited by - reply2hemant on 06/27/2013 08:21:42
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000