PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > Select Records and Insert into Text File?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Select Records and Insert into Text File?

Réponse
 
LinkBack Outils de la discussion
Vieux 14/09/2007, 18h12   #1
junkmail115@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Select Records and Insert into Text File?

Greetings,

A novice needs some advice:

I am able to bulk insert data from a text file into a table. Is it
possible to run a query and insert the results into a text file on the
local or network hard drive?

Thanks For Reading,
Aaron

  Réponse avec citation
Vieux 14/09/2007, 19h03   #2
Jack Vamvas
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Select Records and Insert into Text File?

One option is to use DTS , check this tutorial which gives you an overview
of the basic concept
http://www.sqldts.com/299.aspx
--

Jack Vamvas
___________________________________
Need an IT job? http://www.ITjobfeed.com




<junkmail115@gmail.com> wrote in message
news:1189789969.933601.166560@g4g2000hsf.googlegro ups.com...
> Greetings,
>
> A novice needs some advice:
>
> I am able to bulk insert data from a text file into a table. Is it
> possible to run a query and insert the results into a text file on the
> local or network hard drive?
>
> Thanks For Reading,
> Aaron
>



  Réponse avec citation
Vieux 14/09/2007, 22h36   #3
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Select Records and Insert into Text File?

(junkmail115@gmail.com) writes:
> A novice needs some advice:
>
> I am able to bulk insert data from a text file into a table. Is it
> possible to run a query and insert the results into a text file on the
> local or network hard drive?


There is no BULK EXPORT that is the inversion of BULK INSERT. You can
spawn the BCP command from xp_cmdshell, but xp_cmdshell is disabled on
SQL 2005 by default, and your DBA may not want to enable it.

Keep in mind that SQL Server is a server application, and it mainly
works with data in the database, and talk with clients over the network.
Things like reading files is mainly a duty for client programs to do.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h14.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10450 seconds with 11 queries