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

Database

 
GeneralRe: MSSQL Distinct for one field, possible? Pin
Blue_Boy10-Apr-08 10:06
Blue_Boy10-Apr-08 10:06 
GeneralAuthenticate User in SQL Stored Procedure Pin
Paul McGann8-Apr-08 4:16
professionalPaul McGann8-Apr-08 4:16 
GeneralRe: Authenticate User in SQL Stored Procedure Pin
Mark J. Miller8-Apr-08 5:31
Mark J. Miller8-Apr-08 5:31 
QuestionFront End GUI mySQL DB Manager Suggestions? Pin
humblepgmr8-Apr-08 3:57
humblepgmr8-Apr-08 3:57 
AnswerRe: Front End GUI mySQL DB Manager Suggestions? Pin
John_Adams8-Apr-08 21:55
John_Adams8-Apr-08 21:55 
AnswerRe: Front End GUI mySQL DB Manager Suggestions? Pin
ChandraRam9-Apr-08 2:03
ChandraRam9-Apr-08 2:03 
QuestionSybase: how can I select from stored proc? Pin
devvvy8-Apr-08 3:17
devvvy8-Apr-08 3:17 
AnswerRe: Sybase: how can I select from stored proc? Pin
Mark J. Miller8-Apr-08 5:48
Mark J. Miller8-Apr-08 5:48 
IMO this would be a bad idea. This would place your transaction (even if you're not doing an update) in a distributed context and distributed transactions are really expensive. I don't know if Sybase supports the same syntax, but SQL Server will allow you to insert the results of a stored procedure directly into a table like this:

<br />
INSERT INTO myTable(col1, col2, col3)<br />
  EXEC myProc @param1, @param2<br />


This works if the table definition exactly matches the output of the stored proc. To accomplish this you could define a temp table, store the results of the stored proc in the temp table and then select the column you want from the temp table. Like this:

<br />
CREATE TABLE #myTable(col1, col2, col3)<br />
<br />
INSERT INTO myTable(col1, col2, col3)<br />
  EXEC myProc @param1, @param2<br />
<br />
SELECT col1 FROM #myTable<br />
<br />
DROP TABLE #myTable<br />


You'll have to look up the syntax, as I don't know if Sybase supports it, but it would be vastly better than running a remote query.


GeneralRe: Sybase: how can I select from stored proc? Pin
devvvy8-Apr-08 14:56
devvvy8-Apr-08 14:56 
GeneralReplication Pin
briogene8-Apr-08 0:53
briogene8-Apr-08 0:53 
GeneralSQL - Insert Record Error Trapping Pin
imnotso#7-Apr-08 23:09
imnotso#7-Apr-08 23:09 
GeneralRe: SQL - Insert Record Error Trapping Pin
Blue_Boy8-Apr-08 0:39
Blue_Boy8-Apr-08 0:39 
GeneralRe: SQL - Insert Record Error Trapping Pin
imnotso#8-Apr-08 0:42
imnotso#8-Apr-08 0:42 
GeneralRe: SQL - Insert Record Error Trapping Pin
Michael Potter8-Apr-08 4:04
Michael Potter8-Apr-08 4:04 
GeneralRe: SQL - Insert Record Error Trapping Pin
imnotso#8-Apr-08 4:15
imnotso#8-Apr-08 4:15 
GeneralRe: SQL - Insert Record Error Trapping Pin
Michael Potter8-Apr-08 4:47
Michael Potter8-Apr-08 4:47 
QuestionIs there a query that can change all datasources for all dataviews? Pin
Daniel_Logan7-Apr-08 23:01
Daniel_Logan7-Apr-08 23:01 
AnswerRe: Is there a query that can change all datasources for all dataviews? Pin
Paddy Boyd8-Apr-08 0:48
Paddy Boyd8-Apr-08 0:48 
GeneralRe: Is there a query that can change all datasources for all dataviews? Pin
Daniel_Logan8-Apr-08 2:40
Daniel_Logan8-Apr-08 2:40 
GeneralRe: Is there a query that can change all datasources for all dataviews? Pin
Pete O'Hanlon8-Apr-08 2:58
mvePete O'Hanlon8-Apr-08 2:58 
GeneralRe: Is there a query that can change all datasources for all dataviews? Pin
Daniel_Logan8-Apr-08 21:16
Daniel_Logan8-Apr-08 21:16 
Generalsplit function with select statement Pin
gottimukkala7-Apr-08 5:02
gottimukkala7-Apr-08 5:02 
GeneralRe: split function with select statement Pin
Mark J. Miller7-Apr-08 5:44
Mark J. Miller7-Apr-08 5:44 
GeneralRe: split function with select statement Pin
Syed Mehroz Alam7-Apr-08 20:28
Syed Mehroz Alam7-Apr-08 20:28 
GeneralRe: split function with select statement Pin
Mark J. Miller8-Apr-08 2:45
Mark J. Miller8-Apr-08 2:45 

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.