Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





BCP Funtion Problem


Hi,

I'm using the function bcp to transfer data from my table to a data file. When I use it at the dos command prompt, no problem everything works really well.

But if I use query analyser I have an error: unable to open bcp host data-file.

Here's the line:
xp_cmdshell 'bcp table.owner.inventaire out c:1est.txt'

The problem is not with xp_cmdshell because I can call simpler executables in query analyser.




View Complete Forum Thread with Replies

Related Forum Messages:
Seeking An SQL Funtion ~ Do You Know IT
Hi All,

Please can you help.


i a looking for a funtion that will be able to view all the child (many) records in a one to many relation ship and make a list of the parents names....is there such a function???

Example

In the one to many contacts db below, if this mystery function ran for "bill" it would say his "parents records" are Gary and Mac


Parent Table~ Child Table

Gary Bill
Tom
Harry

Mac Bill
Jef
Tod

Charles Les
Helen



any help here would be much apprecaited


kind regards

Tony UK

View Replies !
Reg Split Funtion
Hi,

Is it possible to split the following value in sql server ?

I have the value like 25 Email Accounts,50 Email Accounts in my sqlserver database.
Here i need only the numeric value .ie 25,50.Is it possible? can any one give me the solution ..

I am using ASP.Net and C# backend is SQL Server 2000.

Thanks and Regards
Arul

View Replies !
Replace Funtion
how do i write a replace function that will replace a certain character with a return key (ie what happens when we do Ctrl+return key in SQL Enterprise table... so that the rest of the cell data in the column is on the next line?!

SELECT REPLACE(tasks, '/', '????') AS EXPR1
FROM log_descriptions


what should ???? be?

View Replies !
To_date Funtion YYYY-DD-MM
Hi All:
We have a database date column in this format: 1/27/2008 1:20:00 AM and need a date or time function to cast local JVM time into the above format.

Suggest me the best options.
1. To go for a more comfortable date format in the database itself or
2. To have an appropriate conversion in my code.( I am not feeling good about the suffix AM/PM in the date column!)

Thanks.

View Replies !
Round Funtion On Entire Columns In MSSQL?
Hi,I'd like to round all amounts in a certain column to 2 decimals.I tried the following query, but eventhough the syntax is correct, itdoesn't give any result:update gbkmutset bdr_hfl = round(bdr_hfl,2)can anyone help me?cheers,steve

View Replies !
REPLACE Funtion For Multiple Values In SP/Reporting Services
Running into a problem with trying to pull multiple values in a stored procedure.
Ran Profiler for trace on what variable is coming back as when running in Reporting Services.
Profiler shows this:
 

exec apGetCompanysByRep @Product = N'Absorbent Pads,Airedale Terrier'
 
Trying to run Replace function but not quite getting the syntaxt correct. The stored procedure will work but when running report will often get unclosed quotation marks.
What I have:
 

Set @Product=

Replace(@Product, '''' + ',' + @product + '''', (@Product + '''' + ',' + ' ' + '''' + @product + ''''))

 
This is probably a little too much coding but I've tried several ways.
 
In the SP the code is as follows:
 

CREATE PROCEDURE [dbo].[apGetCompanysByRep]

@Magazine varchar(6) = null

, @DirectsMagazine varchar(6) = null

, @Category varchar(50) = null

, @SubCategory varchar(50) = null

--, @FirstName varchar(30)

, @LastName varchar(30)= null

, @Product varchar(1100)

AS

declare @SQL varchar(2000)

Set @Product=Replace(@Product, '''' + ',' + @product + '''', (@Product + '''' + ',' + ' ' + '''' + @product + ''''))



set @SQL = '



 
 
Thanks for any assistance anyone can give.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved