An Idea can change your life.....
Showing posts with label interivew questions. Show all posts
Showing posts with label interivew questions. Show all posts

Sunday, November 30, 2008

sql server execute all files in a folder using sqlcmd

Step 1. Create a sql file (proc.sql) and palace it here C:\SqlFiles\01_database\proc.sql

create procedure procName
as
begin
select * from DimProduct
end

Step2. Create a sql file(proc1.sql) and place it here C :\SqlFiles\proc1.sql

create procedure procName1
as
begin
select * from DimProduct
end

step3.Create a BatchCommand file(ExecuteSqlFiles.bat) with following text in it and place it here C:\SqlFiles\ExecuteSqlFiles.bat

for /R %%X in (*.SQL) do SQLCMD -S Server -d Database -U UserID -P Password -I -i "%%X" >> ResultScript.txt

Step4. Run the ExecuteSqlFiles.bat (i.e by clicking on it)

A file (C:\SqlFiles\ResultScript.txt) if not exist is created and the errors encounterd while executing the sql files is written to the file.

Saturday, March 29, 2008

DotNet-Good programming practices

Read this doc on Scribd: DotNet-Good programming practices

DOT NET in Samples

Read this doc on Scribd: DOTNETinSamples

DotNet faq

Read this doc on Scribd: DotNet faq

aspdotNET IQ

Read this doc on Scribd: aspdotNET IQ

SQL Common Interview Questions

Read this doc on Scribd: SQL FAQ

DotNet SQL Interview Questions

Read this doc on Scribd: DotNet SQL Interview Questions 007