Click here to Skip to main content
15,868,016 members
Home / Discussions / Database
   

Database

 
GeneralRe: Problem with row concatenation Pin
Payal_e_m17-Oct-07 18:06
Payal_e_m17-Oct-07 18:06 
GeneralRe: Problem with row concatenation Pin
pmarfleet17-Oct-07 20:15
pmarfleet17-Oct-07 20:15 
AnswerRe: Problem with row concatenation Pin
manojm3917-Oct-07 20:18
manojm3917-Oct-07 20:18 
GeneralRe: Problem with row concatenation Pin
Payal_e_m18-Oct-07 16:28
Payal_e_m18-Oct-07 16:28 
QuestionHow to Install SSL in Workgroup Environment for SQL Server? Pin
DotNetWWW17-Oct-07 2:54
DotNetWWW17-Oct-07 2:54 
AnswerRe: How to Install SSL in Workgroup Environment for SQL Server? [modified] Pin
Mike Dimmick17-Oct-07 6:22
Mike Dimmick17-Oct-07 6:22 
GeneralRe: How to Install SSL in Workgroup Environment for SQL Server? Pin
DotNetWWW1-Nov-07 5:40
DotNetWWW1-Nov-07 5:40 
QuestionDynamic ColumnName in Stored Procedure Pin
Herman<T>.Instance17-Oct-07 2:27
Herman<T>.Instance17-Oct-07 2:27 
Hi,

I need to check if a Value exists in a Table. I want to create 1 SP for al datachecks for different fields and tables.

I created an SP:
CREATE PROCEDURE DBO.SP_CHECK_BASEVALUE
@CodeInGrid Varchar(255),
@FieldInTable Varchar(255),
@Table Varchar(255)
AS

DECLARE @sql nvarchar(400)
SET @sql = 'SELECT COUNT(*) FROM ' + @Table + ' WHERE '+ @FieldInTable + ' = ' + @CodeInGrid
EXEC sp_executesql @sql
GO


Problem is @FieldInTable. Is says as Error that Column 'Column' does not exist.
How to create an SP that sees @FieldInTable as ColummName as stead of a varchar value.

AnswerRe: Dynamic ColumnName in Stored Procedure Pin
Colin Angus Mackay17-Oct-07 2:40
Colin Angus Mackay17-Oct-07 2:40 
GeneralRe: Dynamic ColumnName in Stored Procedure Pin
Herman<T>.Instance17-Oct-07 3:03
Herman<T>.Instance17-Oct-07 3:03 
GeneralRe: Dynamic ColumnName in Stored Procedure Pin
Colin Angus Mackay17-Oct-07 3:11
Colin Angus Mackay17-Oct-07 3:11 
GeneralRe: Dynamic ColumnName in Stored Procedure Pin
Colin Angus Mackay17-Oct-07 3:38
Colin Angus Mackay17-Oct-07 3:38 
GeneralRe: Dynamic ColumnName in Stored Procedure Pin
Herman<T>.Instance17-Oct-07 3:46
Herman<T>.Instance17-Oct-07 3:46 
QuestionHelp with a SELECT statement required pls. Pin
Steven J Jowett17-Oct-07 2:27
Steven J Jowett17-Oct-07 2:27 
AnswerRe: Help with a SELECT statement required pls. Pin
Colin Angus Mackay17-Oct-07 2:43
Colin Angus Mackay17-Oct-07 2:43 
GeneralRe: Help with a SELECT statement required pls. Pin
Michael Potter17-Oct-07 10:15
Michael Potter17-Oct-07 10:15 
GeneralRe: Help with a SELECT statement required pls. Pin
Colin Angus Mackay17-Oct-07 10:17
Colin Angus Mackay17-Oct-07 10:17 
GeneralRe: Help with a SELECT statement required pls. Pin
Michael Potter17-Oct-07 11:40
Michael Potter17-Oct-07 11:40 
GeneralRe: Help with a SELECT statement required pls. Pin
Steven J Jowett17-Oct-07 22:41
Steven J Jowett17-Oct-07 22:41 
QuestionDatatype for NULL Pin
N a v a n e e t h17-Oct-07 2:03
N a v a n e e t h17-Oct-07 2:03 
AnswerRe: Datatype for NULL Pin
Mike Dimmick17-Oct-07 2:22
Mike Dimmick17-Oct-07 2:22 
GeneralRe: Datatype for NULL Pin
N a v a n e e t h17-Oct-07 2:41
N a v a n e e t h17-Oct-07 2:41 
GeneralRe: Datatype for NULL Pin
Colin Angus Mackay17-Oct-07 2:45
Colin Angus Mackay17-Oct-07 2:45 
GeneralRe: Datatype for NULL Pin
N a v a n e e t h17-Oct-07 2:50
N a v a n e e t h17-Oct-07 2:50 
GeneralRe: Datatype for NULL Pin
Mike Dimmick17-Oct-07 6:33
Mike Dimmick17-Oct-07 6:33 

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.