Click here to Skip to main content
15,899,475 members
Home / Discussions / Database
   

Database

 
QuestionDate Problem Pin
Syed Shahid Hussain24-Sep-09 22:51
Syed Shahid Hussain24-Sep-09 22:51 
AnswerRe: Date Problem Pin
J4amieC24-Sep-09 23:06
J4amieC24-Sep-09 23:06 
GeneralRe: Date Problem Pin
Syed Shahid Hussain25-Sep-09 1:23
Syed Shahid Hussain25-Sep-09 1:23 
AnswerRe: Date Problem Pin
David Skelly25-Sep-09 2:26
David Skelly25-Sep-09 2:26 
GeneralRe: Date Problem Pin
Syed Shahid Hussain25-Sep-09 2:37
Syed Shahid Hussain25-Sep-09 2:37 
AnswerRe: Date Problem Pin
PIEBALDconsult26-Sep-09 4:47
mvePIEBALDconsult26-Sep-09 4:47 
GeneralRe: Date Problem Pin
Syed Shahid Hussain26-Sep-09 5:11
Syed Shahid Hussain26-Sep-09 5:11 
QuestionQueries On SQL Job [modified] Pin
Payal_e_m24-Sep-09 14:04
Payal_e_m24-Sep-09 14:04 
QuestionSELECT INTO or CREATE TABLE Pin
bxlorenz24-Sep-09 10:30
bxlorenz24-Sep-09 10:30 
AnswerRe: SELECT INTO or CREATE TABLE [modified] Pin
Blikkies24-Sep-09 19:22
professionalBlikkies24-Sep-09 19:22 
GeneralRe: SELECT INTO or CREATE TABLE Pin
bxlorenz25-Sep-09 4:22
bxlorenz25-Sep-09 4:22 
QuestionDisplay few columns in datagridview. Pin
jeshra27924-Sep-09 8:30
jeshra27924-Sep-09 8:30 
AnswerRe: Display few columns in datagridview. Pin
Dave290924-Sep-09 12:49
Dave290924-Sep-09 12:49 
AnswerRe: Display few columns in datagridview. Pin
Syed Shahid Hussain24-Sep-09 22:19
Syed Shahid Hussain24-Sep-09 22:19 
QuestionHow do I automatically backup my sql server 2005 express database on another server? Pin
Nada Adel24-Sep-09 2:15
Nada Adel24-Sep-09 2:15 
AnswerRe: How do I automatically backup my sql server 2005 express database on another server? Pin
Abhishek Sur24-Sep-09 3:33
professionalAbhishek Sur24-Sep-09 3:33 
AnswerRe: How do I automatically backup my sql server 2005 express database on another server? Pin
Johan Hakkesteegt24-Sep-09 5:56
Johan Hakkesteegt24-Sep-09 5:56 
QuestionHow to Optimize MySql Database? Pin
Paramhans Dubey23-Sep-09 21:40
professionalParamhans Dubey23-Sep-09 21:40 
AnswerRe: How to Optimize MySql Database? Pin
Ashfield24-Sep-09 1:26
Ashfield24-Sep-09 1:26 
GeneralRe: How to Optimize MySql Database? Pin
Paramhans Dubey24-Sep-09 2:15
professionalParamhans Dubey24-Sep-09 2:15 
AnswerRe: How to Optimize MySql Database? Pin
Dave290924-Sep-09 12:45
Dave290924-Sep-09 12:45 
QuestionNesting a stored proc call in a where clause? Pin
Dave290923-Sep-09 14:23
Dave290923-Sep-09 14:23 
Here's the short question - how can I make this work?

create function callme()
returns TABLE AS
RETURN(exec MyExistingSP)

And the longer question on why I'd want it to...

* I've got several stored procs that return table result sets that are fairly large (or larger than I care to scroll through)
* Often, I'm doing ad-hoc queries where I only want to see one or two rows returned by the stored proc.
* If I need to whip up a function/stored proc to allow this, it would be handy if it would take the stored proc name as a parameter
* Would also be nice to take a subset of the column list in a select, or add an order by
* I'm most interested in SQL Server 2000+
* Performance is not an issue (within some reason...), as this is only for typed in ad-hoc queries

select column1, column2
from callme('MySP')
where id > 500
order by LastModified --> would be nice to see the subset...

I can do this easily with a multiline function for each stored proc, but it's not worth that much work. I keep hoping there's just a twist of syntax I'm missing, but I'm afraid that's not the case...

Any thoughts?

Thanks,

Dave
AnswerRe: Nesting a stored proc call in a where clause? Pin
Dave290923-Sep-09 14:54
Dave290923-Sep-09 14:54 
AnswerRe: Nesting a stored proc call in a where clause? Pin
Ashfield23-Sep-09 21:16
Ashfield23-Sep-09 21:16 
QuestionRe: Nesting a stored proc call in a where clause? Pin
Dave290924-Sep-09 12:37
Dave290924-Sep-09 12:37 

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.