|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Query - pop-up menu for user data entryUsing the following syntax:
Select fname, lastn From list Where fname like 'jones' I need the syntax that the user can enter a name to perform a query (the user will enter a name on a pop-up menu before the query is performed). Roy,
You didn't say in what context you would be using this, so the below-code assumes you are using a Stored Procedure: CREATE STORED PROCEDURE [dbo].[usp_FindName] @LName varchar(100)='' AS IF @LName<>'' BEGIN Select fname, lastn From list Where fname like @LName END GO Hope thi assists, Tony Show quoteHide quote "ROY A. DAY" wrote: > Using the following syntax: > Select fname, lastn > From list > Where fname like 'jones' > > I need the syntax that the user can enter a name to perform a query (the > user will enter a name on a pop-up menu before the query is performed).
Qualifing table names with dbo
Stored procedures, nullable parameters, COALESCE Naming Conventions: Prefixing Columns w/ Table Names 1 database, 2 threads Ranking Functions: ROW_NUMBER() Performance Isolation levels and SELECT's (even when using SERIALIZABLE!) Group By (part of a field) query performance Look for differences linked server problem on SQL Server 2000 sp3 |
|||||||||||||||||||||||