Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Bob Barrows" Newsgroups: comp.databases.ms-sqlserver Subject: Re: How do I best take a sql dump with contents where you can see pk and fk Date: Mon, 16 Jul 2012 19:35:23 -0400 Organization: A noiseless patient Spider Lines: 25 Message-ID: References: Injection-Date: Mon, 16 Jul 2012 23:35:12 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="bd099084a2caba1d0ebe690afacb9523"; logging-data="18300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/N5fJGEFpjdDpOHtMbU/dgVPgsviVhmrA=" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response X-Antivirus-Status: Clean X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-Antivirus: avast! (VPS 120302-0, 03/02/2012), Outbound message Cancel-Lock: sha1:7U3NpCWCzZxeHD/nqJt4Rh4Y0vo= X-Priority: 3 X-MSMail-Priority: Normal Xref: csiph.com comp.databases.ms-sqlserver:1178 Still not enough specific information. How do you intend that the primary and foreign keys be stored in the file? As a separate resultset? Show us what you want to see in the file given a 3-colomn table with three rows, a primary key on the first column and a foreign key on the third. Exactly what will the file contain. Will it be a text file? If so, show us the text. Tony Johansson wrote: > I want to get the name of the columns, the primary key and foreign > key and the contents. > I want all this output to be stored in a file. > I can do select * but can I redirect the output to a file. > > //Tony > > "Erland Sommarskog" skrev i meddelandet > news:XnsA092F33A6DD1CYazorman@127.0.0.1... >> Tony Johansson (johansson.andersson@telia.com) writes: >>> I need to extract a sql dump from several tables where I can see the >>> contens and primary key and foreign key >> >> SELECT *? Or do you want the "dump" in any special format? Can you >> be more specific? >>