Click here to Skip to main content
15,889,216 members
Home / Discussions / Database
   

Database

 
QuestionError trapping in SQL Server 2005 [modified] Pin
vanikanc1-Aug-11 7:37
vanikanc1-Aug-11 7:37 
AnswerRe: Error trapping in SQL Server 2005 Pin
jschell1-Aug-11 8:25
jschell1-Aug-11 8:25 
GeneralRe: Error trapping in SQL Server 2005 Pin
vanikanc1-Aug-11 8:29
vanikanc1-Aug-11 8:29 
GeneralRe: Error trapping in SQL Server 2005 Pin
jschell2-Aug-11 9:18
jschell2-Aug-11 9:18 
AnswerRe: Error trapping in SQL Server 2005 Pin
Shameel1-Aug-11 8:59
professionalShameel1-Aug-11 8:59 
AnswerRe: Error trapping in SQL Server 2005 Pin
Mycroft Holmes1-Aug-11 13:01
professionalMycroft Holmes1-Aug-11 13:01 
AnswerRe: Error trapping in SQL Server 2005 Pin
thatraja1-Aug-11 15:00
professionalthatraja1-Aug-11 15:00 
QuestionDynamic sort Pin
vanikanc1-Aug-11 2:54
vanikanc1-Aug-11 2:54 
Hello,

I want to pass the sort as an input parameter to the stored proc.

I am constructing a dynamic sql and executing it. The problem is more like a syntax issue, where in I an checking for certain value in sql.
----
Set @sql1 = '
SELECT distinct
sd.storeno storeno,
sd.storename storename
FROM
test_table sd
where sd.status='N'
ORDER by'

set @sql1 = @sql1 + ' ' + @sort
---------

How would I check for additional conditions in this sql? I tried to enclose N in double still did not work.

Many thanks!
AnswerRe: Dynamic sort Pin
Herman<T>.Instance1-Aug-11 3:15
Herman<T>.Instance1-Aug-11 3:15 
GeneralRe: Dynamic sort Pin
vanikanc1-Aug-11 3:45
vanikanc1-Aug-11 3:45 
GeneralRe: Dynamic sort Pin
Corporal Agarn1-Aug-11 5:18
professionalCorporal Agarn1-Aug-11 5:18 
AnswerRe: Dynamic sort [modified] Pin
Shameel1-Aug-11 5:30
professionalShameel1-Aug-11 5:30 
GeneralRe: Dynamic sort Pin
vanikanc1-Aug-11 7:34
vanikanc1-Aug-11 7:34 
AnswerRe: Dynamic sort Pin
jschell1-Aug-11 8:34
jschell1-Aug-11 8:34 
QuestionStored Procedure to find emails Pin
Tiger45631-Jul-11 7:08
Tiger45631-Jul-11 7:08 
AnswerRe: Stored Procedure to find emails [modified] Pin
Shameel31-Jul-11 7:20
professionalShameel31-Jul-11 7:20 
GeneralRe: Stored Procedure to find emails Pin
Tiger45631-Jul-11 7:41
Tiger45631-Jul-11 7:41 
GeneralRe: Stored Procedure to find emails Pin
Shameel31-Jul-11 7:47
professionalShameel31-Jul-11 7:47 
GeneralRe: Stored Procedure to find emails Pin
Anish Gopi2-Aug-11 2:02
sitebuilderAnish Gopi2-Aug-11 2:02 
GeneralRe: Stored Procedure to find emails Pin
Shameel2-Aug-11 8:45
professionalShameel2-Aug-11 8:45 
Question[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Pin
nazimghori31-Jul-11 1:14
nazimghori31-Jul-11 1:14 
AnswerRe: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Pin
thatraja31-Jul-11 6:03
professionalthatraja31-Jul-11 6:03 
AnswerRe: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Pin
Shameel31-Jul-11 7:23
professionalShameel31-Jul-11 7:23 
AnswerRe: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Pin
Monjurul Habib31-Jul-11 7:41
professionalMonjurul Habib31-Jul-11 7:41 
QuestionMaking the SSIS Data Reader Source Query Dynamic Pin
Member 808202128-Jul-11 14:44
Member 808202128-Jul-11 14:44 

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.