Click here to Skip to main content
15,886,110 members
Home / Discussions / Database
   

Database

 
QuestionData Migration- ORACLE and VB.NET Pin
cbe_pav20-Jul-09 0:43
cbe_pav20-Jul-09 0:43 
AnswerRe: Data Migration- ORACLE and VB.NET Pin
dan!sh 20-Jul-09 0:54
professional dan!sh 20-Jul-09 0:54 
Questionsql code problem Help pls Pin
TALHAKOSEN19-Jul-09 22:21
TALHAKOSEN19-Jul-09 22:21 
AnswerRe: sql code problem Help pls Pin
Blue_Boy19-Jul-09 22:29
Blue_Boy19-Jul-09 22:29 
GeneralRe: sql code problem Help pls Pin
TALHAKOSEN19-Jul-09 23:10
TALHAKOSEN19-Jul-09 23:10 
GeneralRe: sql code problem Help pls Pin
Blue_Boy19-Jul-09 23:13
Blue_Boy19-Jul-09 23:13 
QuestionGenerating dynamic where clause in stored procedure in sqlserver 2005 Pin
nainakarri19-Jul-09 20:34
nainakarri19-Jul-09 20:34 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
Robin_Roy19-Jul-09 21:32
Robin_Roy19-Jul-09 21:32 
Hello Naina,

You can use EXEC statement to execute your dynamic query inside your stored procedure....

Refer the exeample below...

CREATE PROCEDURE dbo.sproc_SampleProc
@strTableName VARCHAR(100),
@strColumnNames VARCHAR(255) --Can be comma seperated column names...
AS
BEGIN
SET NOCOUNT ON;

DECLARE @strDynamicQuery VARCHAR(500)

SET @strDynamicQuery = 'SELECT '+@strColumnName+' FROM '+@strTableName
EXEC (@strDynamicQuery)
END
GO

Enjoy Programming !!!

Robin
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
Blue_Boy19-Jul-09 21:59
Blue_Boy19-Jul-09 21:59 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
--CELKO--20-Jul-09 8:44
--CELKO--20-Jul-09 8:44 
AnswerRe: Generating dynamic where clause in stored procedure in sqlserver 2005 Pin
PIEBALDconsult20-Jul-09 10:44
mvePIEBALDconsult20-Jul-09 10:44 
QuestionUsing Crystal Reprot 10 within MS Access 2003 Pin
aftab8318-Jul-09 0:44
aftab8318-Jul-09 0:44 
AnswerRe: Using Crystal Reprot 10 within MS Access 2003 Pin
Jerry Hammond18-Jul-09 6:34
Jerry Hammond18-Jul-09 6:34 
GeneralRe: Using Crystal Reprot 10 within MS Access 2003 Pin
Mycroft Holmes18-Jul-09 15:23
professionalMycroft Holmes18-Jul-09 15:23 
QuestionStoring an array in a string or ...? Pin
Ehsan Baghaki17-Jul-09 21:36
Ehsan Baghaki17-Jul-09 21:36 
AnswerRe: Storing an array in a string or ...? Pin
Luc Pattyn18-Jul-09 0:08
sitebuilderLuc Pattyn18-Jul-09 0:08 
AnswerRe: Storing an array in a string or ...? Pin
riced18-Jul-09 0:29
riced18-Jul-09 0:29 
AnswerRe: Storing an array in a string or ...? Pin
Mycroft Holmes18-Jul-09 15:34
professionalMycroft Holmes18-Jul-09 15:34 
GeneralRe: Storing an array in a string or ...? Pin
Luc Pattyn18-Jul-09 18:03
sitebuilderLuc Pattyn18-Jul-09 18:03 
GeneralRe: Storing an array in a string or ...? Pin
Mycroft Holmes18-Jul-09 22:31
professionalMycroft Holmes18-Jul-09 22:31 
GeneralRe: Storing an array in a string or ...? Pin
Luc Pattyn19-Jul-09 2:24
sitebuilderLuc Pattyn19-Jul-09 2:24 
QuestionSQL High Availabilty Pin
Member 259952517-Jul-09 0:08
Member 259952517-Jul-09 0:08 
QuestionDISTINCT and MAX in SQL Query Pin
jishbalan16-Jul-09 20:34
jishbalan16-Jul-09 20:34 
AnswerRe: DISTINCT and MAX in SQL Query Pin
vica dianto16-Jul-09 20:49
vica dianto16-Jul-09 20:49 
AnswerRe: DISTINCT and MAX in SQL Query Pin
abcurl17-Jul-09 10:16
abcurl17-Jul-09 10:16 

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.