Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Ask for input during SQL script execution

Author  Topic 

akalehzan
Starting Member

21 Posts

Posted - 2007-12-18 : 18:47:53
Hi All,

I have this SQL script:

Select user_name from staff
Where user_name like $Please enter User Name$

I like the script prompt for User Name.

Does SQL Server support this?
Thanks in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-18 : 18:53:34
No. SQL Server is not a programming language where you can create an application. So you need to write that on your own and then query the database.

Common choices are C# and VB.NET, both using ADO.NET.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

akalehzan
Starting Member

21 Posts

Posted - 2007-12-18 : 19:29:08
Hi Tara,

I know MS SQL is not a programming language.
I'm asking if it is possible to write a SQL script that when you run it, it prompts users for input.

I have seen Oracle SQL to do do that.

Regards,

Abrahim
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-12-18 : 21:19:23
Not with t-sql command, you may write other script like vb script for that. Can use vb script to connect to sql and run t-sql statements.
Go to Top of Page

akalehzan
Starting Member

21 Posts

Posted - 2007-12-18 : 22:57:54
I got it.

Thanks,

Abrahim
Go to Top of Page
   

- Advertisement -