Showing posts with label input. Show all posts
Showing posts with label input. Show all posts

Friday, March 23, 2012

Prompting for input from user using SQL Server 2000...

I know how to do it in Oracle.
ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
How do you do it in SQL Server 2000?SQL Server cannot do this, as SQL Server executes entirely at the server
side. (I take it that you don't want to prompt to pop up on the server
machine?)
So, this has to be done my the client application. None of the tools that
comes with SQL Server has that feature, as they aren't designed to be
end-user tools not development packages.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
news:TEL2c.137059$%72.48338@.twister.nyroc.rr.com...
> I know how to do it in Oracle.
> ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
> How do you do it in SQL Server 2000?
>|||Hi,
You do not have that kind of facility in SQL Server.
Thanks
Hari
MCDBA
"Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
news:TEL2c.137059$%72.48338@.twister.nyroc.rr.com...
> I know how to do it in Oracle.
> ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
> How do you do it in SQL Server 2000?
>|||I want to create a procedure the I can run from Query Analyzer that prompts
the user for input and supplies it to the procedure.
Not a big deal, but the client can do it in Oracle and wonders why SQL
can't.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OOR%23rXIBEHA.2628@.TK2MSFTNGP11.phx.gbl...
> SQL Server cannot do this, as SQL Server executes entirely at the server
> side. (I take it that you don't want to prompt to pop up on the server
> machine?)
> So, this has to be done my the client application. None of the tools that
> comes with SQL Server has that feature, as they aren't designed to be
> end-user tools not development packages.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
> news:TEL2c.137059$%72.48338@.twister.nyroc.rr.com...
>|||Hi,
In Query analyzer, Object browser window , right click above the procedure
name and select the debug option. This will ask you to enter the
input parameters of the procedure.
(It may not be same as you required, but allows you to take parameter
values.)
Thanks
Hari
MCDBA
"Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
news:GaM2c.137196$%72.44266@.twister.nyroc.rr.com...
> I want to create a procedure the I can run from Query Analyzer that
prompts
> the user for input and supplies it to the procedure.
> Not a big deal, but the client can do it in Oracle and wonders why SQL
> can't.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> message news:OOR%23rXIBEHA.2628@.TK2MSFTNGP11.phx.gbl...
that
>

Prompting for input from user using SQL Server 2000...

I know how to do it in Oracle.
ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
How do you do it in SQL Server 2000?SQL Server cannot do this, as SQL Server executes entirely at the server
side. (I take it that you don't want to prompt to pop up on the server
machine?)
So, this has to be done my the client application. None of the tools that
comes with SQL Server has that feature, as they aren't designed to be
end-user tools not development packages.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
news:TEL2c.137059$%72.48338@.twister.nyroc.rr.com...
> I know how to do it in Oracle.
> ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
> How do you do it in SQL Server 2000?
>|||Hi,
You do not have that kind of facility in SQL Server.
Thanks
Hari
MCDBA
"Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
news:TEL2c.137059$%72.48338@.twister.nyroc.rr.com...
> I know how to do it in Oracle.
> ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
> How do you do it in SQL Server 2000?
>|||I want to create a procedure the I can run from Query Analyzer that prompts
the user for input and supplies it to the procedure.
Not a big deal, but the client can do it in Oracle and wonders why SQL
can't.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OOR%23rXIBEHA.2628@.TK2MSFTNGP11.phx.gbl...
> SQL Server cannot do this, as SQL Server executes entirely at the server
> side. (I take it that you don't want to prompt to pop up on the server
> machine?)
> So, this has to be done my the client application. None of the tools that
> comes with SQL Server has that feature, as they aren't designed to be
> end-user tools not development packages.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
> news:TEL2c.137059$%72.48338@.twister.nyroc.rr.com...
> > I know how to do it in Oracle.
> >
> > ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
> >
> > How do you do it in SQL Server 2000?
> >
> >
>|||Hi,
In Query analyzer, Object browser window , right click above the procedure
name and select the debug option. This will ask you to enter the
input parameters of the procedure.
(It may not be same as you required, but allows you to take parameter
values.)
Thanks
Hari
MCDBA
"Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
news:GaM2c.137196$%72.44266@.twister.nyroc.rr.com...
> I want to create a procedure the I can run from Query Analyzer that
prompts
> the user for input and supplies it to the procedure.
> Not a big deal, but the client can do it in Oracle and wonders why SQL
> can't.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> message news:OOR%23rXIBEHA.2628@.TK2MSFTNGP11.phx.gbl...
> > SQL Server cannot do this, as SQL Server executes entirely at the server
> > side. (I take it that you don't want to prompt to pop up on the server
> > machine?)
> > So, this has to be done my the client application. None of the tools
that
> > comes with SQL Server has that feature, as they aren't designed to be
> > end-user tools not development packages.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> >
> >
> > "Jonathan McKinney" <jonmckin@.nycap.rr.com> wrote in message
> > news:TEL2c.137059$%72.48338@.twister.nyroc.rr.com...
> > > I know how to do it in Oracle.
> > >
> > > ACCEPT <<variable>> PROMPT 'ENTER VARIABLE: '
> > >
> > > How do you do it in SQL Server 2000?
> > >
> > >
> >
> >
>

Prompt for user input in criteria field of view

In Access, I use [Enter Date] in the Criteria field of the Query. I tried the same thing in SQL Server in the Criteria field of the View and it does not recognize this. Is there a comparable command in SQL to get user input into the Criteria field of a view?

Hi,

you either have to use a procedure with an input parameter or have to put a condition on the query with querying the view with:

Select * from SomeView Where SomeColumn = 'SomeValue'

But there is no GUI on SQL Server.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||MSSQL as service prompts you nothing. You have to write client application to be prompted.|||

Hi Jens,

I was able to find out how to do what I needed using the @. sign (i.e. @.Date Required?). In the criteria field of the SQL view, this generates a 'Date Required?' prompt box when running the view.

Thanks anyway!

Ernie

sql

Wednesday, March 21, 2012

Prompt

In oracle we use Prompt like in the run time it prompt to give input like
insert into test (id, name) values (&id&, &name&)
How can I fulfill this in SqlServer ?
Thanks
Noor
Hi
You can not do this in SQL Server directly. It would require a front end
application and pass the values as parameters to the query/stored procedure.
John
"Noor" <noor@.ngsol.com> wrote in message
news:eudzDz5TEHA.2448@.TK2MSFTNGP09.phx.gbl...
> In oracle we use Prompt like in the run time it prompt to give input like
> insert into test (id, name) values (&id&, &name&)
> How can I fulfill this in SqlServer ?
> Thanks
> Noor
>
>

Promp for info when executing stored procedure

Hello,
How can i do to ask for input parameters when one stored procedure is
executed?
For example:
I have one sp test that has one input parameter(exec sp_test param1), if i
execute the stored procedure without the input parameter its returned the
following error:
Server: Msg 201, Level 16, State 4, Procedure dba_sp_defrag_obj, Line 0
Procedure 'sp_test' expects parameter '@.param1', which was not supplied.
All i want to do is to advertise before the execution the need of input
parameter:
ex:
Insert value for param1:
Insert value for x:
Insert value for y:
Insert value for z:
and so on.
Thanks and best regards,
Jorge Mendes
Try this to get the list of parameters:
Select * from INFORMATION_SCHEMA.Parameters
Where specific_name = '<YourprocedureName>'
order by Ordinal_position
HTH, Jens Suessmeyer.
*** Sent via Developersdex http://www.codecomments.com ***

Promp for info when executing stored procedure

Hello,
How can i do to ask for input parameters when one stored procedure is
executed?
For example:
I have one sp test that has one input parameter(exec sp_test param1), if i
execute the stored procedure without the input parameter its returned the
following error:
Server: Msg 201, Level 16, State 4, Procedure dba_sp_defrag_obj, Line 0
Procedure 'sp_test' expects parameter '@.param1', which was not supplied.
All i want to do is to advertise before the execution the need of input
parameter:
ex:
Insert value for param1:
Insert value for x:
Insert value for y:
Insert value for z:
and so on.
Thanks and best regards,
Jorge MendesTry this to get the list of parameters:
Select * from INFORMATION_SCHEMA.Parameters
Where specific_name = '<YourprocedureName>'
order by Ordinal_position
HTH, Jens Suessmeyer.
*** Sent via Developersdex http://www.developersdex.com ***

Promp for info when executing stored procedure

Hello,
How can i do to ask for input parameters when one stored procedure is
executed?
For example:
I have one sp test that has one input parameter(exec sp_test param1), if i
execute the stored procedure without the input parameter its returned the
following error:
Server: Msg 201, Level 16, State 4, Procedure dba_sp_defrag_obj, Line 0
Procedure 'sp_test' expects parameter '@.param1', which was not supplied.
All i want to do is to advertise before the execution the need of input
parameter:
ex:
Insert value for param1:
Insert value for x:
Insert value for y:
Insert value for z:
and so on.
Thanks and best regards,
Jorge MendesTry this to get the list of parameters:
Select * from INFORMATION_SCHEMA.Parameters
Where specific_name = '<YourprocedureName>'
order by Ordinal_position
HTH, Jens Suessmeyer.
*** Sent via Developersdex http://www.codecomments.com ***