Viewing 15 posts - 18,136 through 18,150 (of 18,926 total)
Not sure Frank... it appears that some Dude got promoted to most valuable primate... don't know what the fuss is all about
.
April 13, 2005 at 9:38 am
if object_id('test') > 0
drop table test
GO
Create table test
(
TheDate smalldatetime null
)
insert into test default values
select * from test
/*
thedate
null
*/
drop table test
where r u displaying that date so that it appears at 1900/01/01?
April 13, 2005 at 9:30 am
Yes it's possible... but why do you want something formatted like this??
if object_id('TEAM') > 0
drop table TEAM
GO
if object_id('FILES') > 0
drop table FILES
GO
CREATE TABLE TEAM
(
FileNumber int not null,
TeamMember varchar(50) not null
)
GO
CREATE...
April 13, 2005 at 9:00 am
Here's something that can help you :
bcp pubs..authors2 in authors.txt -c -t, -Sservername -Usa -Ppassword -h "CHECK_CONSTRAINTS"
BULK INSERT pubs..authors2 FROM 'c:\authors.txt'
WITH (
DATAFILETYPE = 'char',
...
April 13, 2005 at 8:42 am
I would also suggest that you start using the best practice of naming the columns in the insert statement :
Insert into dbo.MyTable (col1, col2, coln) select col1, col2, coln...
April 13, 2005 at 8:32 am
Delete from dbo.YourTable where DateCol < DateAdd(m, -18, getdate())
You can then run this in a job whenever you need (just schedule de job to run whenever necessary).
April 13, 2005 at 7:58 am
R u using a bulk insert statement or just standard sql query?
April 13, 2005 at 7:03 am
Actually UNION ALL doesn't remove dups, it's UNION that does that.
April 13, 2005 at 6:50 am
"LogFilePath.log", ForAppending, True /*create if not exists*/
the 3rd parameter set to true means the the file will be created if it doesn't exists. So you don't need to do...
April 13, 2005 at 6:47 am
This is an exemple of how this trick can be converted to a function and then used in a select statement. But I agree with Kenneth that said that...
April 13, 2005 at 6:32 am
You set the variable @Job to an empty string, then you concatenate all the values that the select will return into that variable, then you can print/return/select the variable.
April 13, 2005 at 6:22 am
no because when it is first evaluated, it is greater than 0, the value is reset after the if is evaluated.
@MyRowcount is a different variable kept in another part of...
April 12, 2005 at 2:00 pm
That's a nice touch Noeld... but I think that the problems comes from the 50 delete statements that don't use any clustered indexes to do the deletes.. resulting in way...
April 12, 2005 at 1:39 pm
This could be cut to subsecond if you want my opinion.
Is this what's going on??
You have a live table where the info is kept.
You have a staging table where new/updated...
April 12, 2005 at 1:33 pm
Viewing 15 posts - 18,136 through 18,150 (of 18,926 total)