Click here to Skip to main content
15,911,786 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to search a dataset Pin
Kschuler27-Sep-06 8:41
Kschuler27-Sep-06 8:41 
GeneralRe: How to search a dataset Pin
Rip Kirby27-Sep-06 23:48
Rip Kirby27-Sep-06 23:48 
GeneralRe: How to search a dataset Pin
Kschuler28-Sep-06 3:05
Kschuler28-Sep-06 3:05 
GeneralRe: How to search a dataset Pin
Rip Kirby28-Sep-06 9:25
Rip Kirby28-Sep-06 9:25 
QuestionGetting Maximum number: Pin
Shahzad.Aslam26-Sep-06 23:55
Shahzad.Aslam26-Sep-06 23:55 
AnswerRe: Getting Maximum number: Pin
albCode27-Sep-06 1:02
albCode27-Sep-06 1:02 
AnswerRe: Getting Maximum number: Pin
Rob Graham27-Sep-06 2:27
Rob Graham27-Sep-06 2:27 
AnswerRe: Getting Maximum number: Pin
Eric Dahlvang27-Sep-06 3:40
Eric Dahlvang27-Sep-06 3:40 
I'm not sure what you are passing as your first parameter, but if you make the following procedure and pass in the Field Name and Table Name, you should get what you're after.
create Procedure sp_sys_getMax
@FieldName varchar(50),
@tablename varchar(255)

as
declare @sql varchar(300)

set @sql = 'select Max(' + @FieldName + ') from ' + @tablename 

exec(@sql)
GO

Be sure to read this article: SQL Injection Attacks and Some Tips on How to Prevent Them[^]


--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters

QuestionEncrypt in Dotnet and Decrypt in SQL 2000 Pin
Prash.26-Sep-06 21:54
Prash.26-Sep-06 21:54 
QuestionHow to write if i have 3 condition for WHERE? Pin
cheeken2u26-Sep-06 20:21
cheeken2u26-Sep-06 20:21 
AnswerRe: How to write if i have 3 condition for WHERE? Pin
albCode27-Sep-06 4:05
albCode27-Sep-06 4:05 
QuestionIDENT_CURRENT Pin
Polymorpher26-Sep-06 19:15
Polymorpher26-Sep-06 19:15 
QuestionHow to excute parameterized storeprocedure in LinkedServer Pin
Rickey_Me26-Sep-06 18:55
Rickey_Me26-Sep-06 18:55 
QuestionProblem with SELECT query using ADO.NET and C# Pin
Baz26-Sep-06 10:06
Baz26-Sep-06 10:06 
AnswerRe: Problem with SELECT query using ADO.NET and C# Pin
indianet26-Sep-06 10:40
indianet26-Sep-06 10:40 
AnswerRe: Problem with SELECT query using ADO.NET and C# Pin
Rob Graham26-Sep-06 16:27
Rob Graham26-Sep-06 16:27 
GeneralRe: Problem with SELECT query using ADO.NET and C# Pin
Baz26-Sep-06 21:54
Baz26-Sep-06 21:54 
AnswerRe: Problem with SELECT query using ADO.NET and C# Pin
Edbert P26-Sep-06 18:10
Edbert P26-Sep-06 18:10 
GeneralRe: Problem with SELECT query using ADO.NET and C# Pin
Baz26-Sep-06 21:46
Baz26-Sep-06 21:46 
AnswerRe: Problem with SELECT query using ADO.NET and C# Pin
albCode27-Sep-06 1:05
albCode27-Sep-06 1:05 
QuestionSQL Datetime question Pin
cbrucewilson6426-Sep-06 8:44
cbrucewilson6426-Sep-06 8:44 
AnswerRe: SQL Datetime question Pin
Michael Potter26-Sep-06 9:09
Michael Potter26-Sep-06 9:09 
GeneralRe: SQL Datetime question Pin
cbrucewilson6427-Sep-06 2:36
cbrucewilson6427-Sep-06 2:36 
QuestionRe: SQL Datetime question Pin
Chris Meech26-Sep-06 9:44
Chris Meech26-Sep-06 9:44 
AnswerRe: SQL Datetime question Pin
cbrucewilson6427-Sep-06 2:42
cbrucewilson6427-Sep-06 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.