Click here to Skip to main content
15,902,939 members
Home / Discussions / Database
   

Database

 
GeneralRe: insert new row in sql server Pin
break_day28-Nov-07 23:01
break_day28-Nov-07 23:01 
GeneralRe: insert new row in sql server Pin
yaad fridman1-Dec-07 19:58
yaad fridman1-Dec-07 19:58 
AnswerRe: insert new row in sql server Pin
ChandraRam28-Nov-07 21:19
ChandraRam28-Nov-07 21:19 
QuestionExport Table to Xml Using Sql Pin
Nagaraju_Focus28-Nov-07 20:09
Nagaraju_Focus28-Nov-07 20:09 
AnswerRe: Export Table to Xml Using Sql Pin
Maharishi Bhatia28-Nov-07 20:56
Maharishi Bhatia28-Nov-07 20:56 
GeneralRe: Export Table to Xml Using Sql Pin
Nagaraju_Focus28-Nov-07 22:23
Nagaraju_Focus28-Nov-07 22:23 
GeneralRe: Export Table to Xml Using Sql Pin
Tobias Schoenig29-Nov-07 1:58
Tobias Schoenig29-Nov-07 1:58 
AnswerRe: Export Table to Xml Using Sql Pin
Maharishi Bhatia1-Dec-07 16:35
Maharishi Bhatia1-Dec-07 16:35 
Hi,

For that you will need to write a PL/SQL for this kind of stuff. In MS SQL 2000/2005 there is an extended stored proc named xp_cmdshell which can be used to access the windows command line which can be used to save file. I have got an example which you can use for this...

DECLARE @FileName varchar(50),
@bcpCommand varchar(2000)

SET @FileName = 'c:\data.txt'

SET @bcpCommand = 'bcp "SELECT * FROM TableName for xml auto" queryout "'
SET @bcpCommand = @bcpCommand + @FileName + '" -U sa -P pwd -c'

EXEC master..xp_cmdshell @bcpCommand


But for this kind of extended proc access the procedure has to run in 'sa' context... or you need administrator rights to do that...

Hope this helps

Maharishi


Nothing is Impossible. Even impossible spells "i m possible"

Questionremote database accessing Pin
dayya28-Nov-07 18:18
dayya28-Nov-07 18:18 
AnswerRe: remote database accessing Pin
pmarfleet28-Nov-07 19:45
pmarfleet28-Nov-07 19:45 
AnswerRe: remote database accessing Pin
Paul Conrad29-Nov-07 13:00
professionalPaul Conrad29-Nov-07 13:00 
QuestionGet size of a table row Pin
Soumya Mathew28-Nov-07 18:10
Soumya Mathew28-Nov-07 18:10 
AnswerRe: Get size of a table row Pin
ChandraRam28-Nov-07 21:27
ChandraRam28-Nov-07 21:27 
AnswerRe: Get size of a table row Pin
Frank Kerrigan30-Nov-07 0:18
Frank Kerrigan30-Nov-07 0:18 
QuestionWhat will happen when more than one click same querry on networking [modified] Pin
r_mohd28-Nov-07 18:09
r_mohd28-Nov-07 18:09 
AnswerRe: What will happen when more than one click same querry on networking Pin
pmarfleet28-Nov-07 19:44
pmarfleet28-Nov-07 19:44 
JokeRe: What will happen when more than one click same querry on networking Pin
ChandraRam28-Nov-07 20:23
ChandraRam28-Nov-07 20:23 
GeneralRe: What will happen when more than one click same querry on networking Pin
pmarfleet29-Nov-07 3:11
pmarfleet29-Nov-07 3:11 
GeneralRe: What will happen when more than one click same querry on networking Pin
ChandraRam29-Nov-07 3:21
ChandraRam29-Nov-07 3:21 
QuestionReading A CSV Then Writing To Oracle Database Pin
cd0428-Nov-07 7:31
cd0428-Nov-07 7:31 
AnswerRe: Reading A CSV Then Writing To Oracle Database Pin
Frank Kerrigan30-Nov-07 0:23
Frank Kerrigan30-Nov-07 0:23 
GeneralRe: Reading A CSV Then Writing To Oracle Database Pin
cd0430-Nov-07 4:00
cd0430-Nov-07 4:00 
QuestionMust declare the scalar variable error::PleaseHelp Pin
rzvme28-Nov-07 3:35
rzvme28-Nov-07 3:35 
AnswerRe: Must declare the scalar variable error::PleaseHelp Pin
pmarfleet28-Nov-07 3:58
pmarfleet28-Nov-07 3:58 
GeneralRe: Must declare the scalar variable error::PleaseHelp Pin
rzvme28-Nov-07 4:26
rzvme28-Nov-07 4:26 

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.