Viewing 15 posts - 16 through 30 (of 32 total)
create procedure select_table
@table varchar(100)
as
declare @sql varchar(1000)
select @sql='select * from'+@table
exec(@Sql)
July 7, 2006 at 5:40 am
Thanks for this... it's just what was needed and is now being used in other places as well.
As for why bank holidays make such a difference? Well because no one...
July 6, 2006 at 3:58 am
I beasically just want to take the text file move it into a SQL database for storage(Once I've got it in there will be updates to run etc, it's just...
September 26, 2005 at 7:31 am
Thanks for making me look!
I was pretty certain I'd set the fields up as varchars but sure enought they are all chars.
Thanks.
July 11, 2005 at 6:14 am
forget I ever asked this question!
Problem all sorted I'd forgotten to remove the previous backup thus it backed up into 2 files.
I feel a bit silly.
May 29, 2005 at 6:21 am
Hi,
here is the file format of one of the files that I have to import.
1 FORENAME ...
March 2, 2005 at 4:28 am
Cheers for that... can someone give me some advice on how to utilise a format file I read up on the internet about bcp's but couldn't find one that explained...
March 1, 2005 at 7:45 am
I was removing a few old programs that haven't been used for years and tiding up our user directories. Had to do a reboot of the server, hence stop SQL.
February 18, 2005 at 8:01 am
No need to worry anymore... I just rebuilt the SQL server installation and went a bit crazy with sp_attach_db.
Everything is up and running.
February 17, 2005 at 3:54 pm
Cheers for the help guys.
When I run it from the command prompt it still fails.
The interesting thing is the path though. That's actually intact, though it is duplicated in there...
February 17, 2005 at 1:56 pm
I use this, it's not for reports but for data sampling:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER PROCEDURE NTH
@table varchar(100),
@destination varchar(100),
@number varchar(100)
AS
DECLARE @sql varchar(2000)
select @sql='select top...
February 15, 2005 at 7:29 am
That explains a lot as I wasn't using SQLmail to send the program but CDOSYS as we don't have SQL mail set up and use CDOSYS which is fine until...
February 1, 2005 at 8:27 am
I've used dynamic sql before and had a nightmare over it, and figured that it wouldn't be necessary with this procedure I'm writing.
The problem I've got though is building in...
February 1, 2005 at 3:24 am
Thanks this is brilliant.
All my previous dedupes I've done have involved doing loops and therefore took a while, I knew a self join might be a way forward but never...
August 12, 2004 at 4:47 am
I completley agree with you, it is a data collection issue. I've always prefered to keep my names into separate fields for this very reason. Hence the fact I was...
July 29, 2004 at 4:14 am
Viewing 15 posts - 16 through 30 (of 32 total)