Click here to Skip to main content
15,891,607 members
Home / Discussions / Database
   

Database

 
GeneralRe: Identity Pin
Sebastian T Xavier5-Mar-08 19:34
Sebastian T Xavier5-Mar-08 19:34 
GeneralRe: Identity Pin
Vimalsoft(Pty) Ltd5-Mar-08 19:37
professionalVimalsoft(Pty) Ltd5-Mar-08 19:37 
GeneralRe: Identity Pin
Sebastian T Xavier5-Mar-08 19:40
Sebastian T Xavier5-Mar-08 19:40 
GeneralRe: Identity Pin
Khawar Abbas15-Mar-08 19:58
Khawar Abbas15-Mar-08 19:58 
GeneralRe: Identity Pin
Sebastian T Xavier5-Mar-08 21:25
Sebastian T Xavier5-Mar-08 21:25 
GeneralConditions Pin
AlexeiXX35-Mar-08 18:55
AlexeiXX35-Mar-08 18:55 
GeneralRe: Conditions Pin
pmarfleet5-Mar-08 19:38
pmarfleet5-Mar-08 19:38 
GeneralRe: Conditions Pin
AlexeiXX36-Mar-08 8:16
AlexeiXX36-Mar-08 8:16 
Hey, thanks for the link
I solved part of my problem with this:
select * from table where col1 = isnull(@param1,col1)
works great

But i have a little different scenario here
One of the parameters is for a function that returns a table, it accepts a string and splits it returning the values as one column rows, like:
select * from fnSplitString ('1,2,4,5,6') Will return:
Value
1
2
3
4
5
6

select * from table where col1 = isnull(@param1,col1)
and col2 in (select * from fnSplitString (@param2))

This works when i pass param2, but if param2 is null i need all the rows
Can this be done with a single query or do i have to make N queryes

I was gonna use for the function something like this:
select * from fnSplitString (isnull('1,2,4,5,6,','String with all posible values but seems inefficient and values can change'))

Any way to omit the second condition when @param2 is null (with single query and without SQl concatenation)?

Thanks in advance

Alexei Rodriguez

GeneralRe: Conditions Pin
Khawar Abbas16-Mar-08 1:43
Khawar Abbas16-Mar-08 1:43 
GeneralRe: Conditions Pin
AlexeiXX36-Mar-08 6:05
AlexeiXX36-Mar-08 6:05 
QuestionQuery Scenario Pin
RadioButton5-Mar-08 9:31
RadioButton5-Mar-08 9:31 
GeneralRe: Query Scenario Pin
Michael Potter5-Mar-08 10:03
Michael Potter5-Mar-08 10:03 
GeneralRe: Query Scenario Pin
Ashfield5-Mar-08 21:31
Ashfield5-Mar-08 21:31 
GeneralCreating a Help Form... [modified] Pin
new_phoenix5-Mar-08 9:17
new_phoenix5-Mar-08 9:17 
GeneralWrong forum Pin
pmarfleet5-Mar-08 10:11
pmarfleet5-Mar-08 10:11 
QuestionUsing ADO.Net to retrieve data from Excel 2007 - Cannot import more than 255 columns Pin
Mehawitchi5-Mar-08 4:33
Mehawitchi5-Mar-08 4:33 
GeneralRe: Using ADO.Net to retrieve data from Excel 2007 - Cannot import more than 255 columns Pin
pmarfleet5-Mar-08 8:37
pmarfleet5-Mar-08 8:37 
GeneralRe: Using ADO.Net to retrieve data from Excel 2007 - Cannot import more than 255 columns Pin
Mehawitchi5-Mar-08 10:11
Mehawitchi5-Mar-08 10:11 
GeneralRe: Using ADO.Net to retrieve data from Excel 2007 - Cannot import more than 255 columns Pin
pmarfleet5-Mar-08 21:38
pmarfleet5-Mar-08 21:38 
GeneralRe: Using ADO.Net to retrieve data from Excel 2007 - Cannot import more than 255 columns Pin
Mehawitchi7-Mar-08 9:49
Mehawitchi7-Mar-08 9:49 
GeneralRe: Using ADO.Net to retrieve data from Excel 2007 - Cannot import more than 255 columns Pin
jvandertol122-Jun-09 9:49
jvandertol122-Jun-09 9:49 
QuestionHow to Execute a DTS Package within a Procedure Pin
Vimalsoft(Pty) Ltd4-Mar-08 23:06
professionalVimalsoft(Pty) Ltd4-Mar-08 23:06 
AnswerRe: How to Execute a DTS Package within a Procedure Pin
pmarfleet5-Mar-08 1:14
pmarfleet5-Mar-08 1:14 
GeneralRe: How to Execute a DTS Package within a Procedure Pin
Vimalsoft(Pty) Ltd5-Mar-08 1:18
professionalVimalsoft(Pty) Ltd5-Mar-08 1:18 
GeneralRe: How to Execute a DTS Package within a Procedure Pin
pmarfleet5-Mar-08 1:30
pmarfleet5-Mar-08 1:30 

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.