Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

Friday, February 24, 2012

bulk insert

We have an clustered sql server 2000 with service pack 4. We are trying to
import some date using 'bulk insert'. The command ends ok but there is no
rows inserted on our table. Furthermore if we specifify a data_file that not
exists the commands end ok with no error message.
The same command and same data_file in our development environment (sql
server 2000 service pack 4 NOT clustered) works fine and if we specify a data
file that not exists we receive the corresponding error message.
That doesn't sond right. We do bulk insert into clustered SQL instances all
the time, and if a non-existing file is specified, an error stating 'file
does not exist' is encountered.
It may help if you post you BULK INSERT statement. Something is missing here.
Linchi
"Juan Bautista" wrote:

> We have an clustered sql server 2000 with service pack 4. We are trying to
> import some date using 'bulk insert'. The command ends ok but there is no
> rows inserted on our table. Furthermore if we specifify a data_file that not
> exists the commands end ok with no error message.
> The same command and same data_file in our development environment (sql
> server 2000 service pack 4 NOT clustered) works fine and if we specify a data
> file that not exists we receive the corresponding error message.
|||Thanks for your reply, here is the bulk insert statement, as you could
see there is nothing special in it.
BULK INSERT Users_Table
FROM 'F:\UsersLoad.txt'
WITH (
fieldterminator='|'
rowterminator='\n' )
"Linchi Shea" wrote:
[vbcol=seagreen]
> That doesn't sond right. We do bulk insert into clustered SQL instances all
> the time, and if a non-existing file is specified, an error stating 'file
> does not exist' is encountered.
> It may help if you post you BULK INSERT statement. Something is missing here.
> Linchi
> "Juan Bautista" wrote:
|||Is the F: drive local for each cluster node, or is it a shared cluster
physical drive resource?
Anthony Thomas

"Juan Bautista" <JuanBautista@.discussions.microsoft.com> wrote in message
news:CA335F4E-A9C6-4117-A107-53CD1995B21F@.microsoft.com...[vbcol=seagreen]
> Thanks for your reply, here is the bulk insert statement, as you could
> see there is nothing special in it.
> BULK INSERT Users_Table
> FROM 'F:\UsersLoad.txt'
> WITH (
> fieldterminator='|'
> rowterminator='\n' )
> "Linchi Shea" wrote:
all[vbcol=seagreen]
'file[vbcol=seagreen]
here.[vbcol=seagreen]
trying to[vbcol=seagreen]
no[vbcol=seagreen]
that not[vbcol=seagreen]
(sql[vbcol=seagreen]
a data[vbcol=seagreen]
|||The drive F: is a shared cluster physical drive resource.
"Anthony Thomas" wrote:

> Is the F: drive local for each cluster node, or is it a shared cluster
> physical drive resource?
>
> Anthony Thomas
>
> --
> "Juan Bautista" <JuanBautista@.discussions.microsoft.com> wrote in message
> news:CA335F4E-A9C6-4117-A107-53CD1995B21F@.microsoft.com...
> all
> 'file
> here.
> trying to
> no
> that not
> (sql
> a data
>
>

Sunday, February 12, 2012

Building a date in SQL

Is there any sql method that takes 3 parameter like, day, month and year . And return me the date.

For example

function(10,3,2007) and it returns 10-03-2007

Thanks,

There is no such function as part of SQL2000 or SQL2005, however you could write your own function. You refer to the function returning 10-03-2007 as an example, however is it as string (char(10)) or as datetime? Also what datatype are the input parameters - integer?

|||

I have find the solution.

Thanks