Forum Replies Created

Viewing 15 posts - 16 through 30 (of 32 total)

  • RE: table variables and dinamic sql question

    create procedure select_table

    @table varchar(100)

    as

    declare @sql varchar(1000)

    select @sql='select * from'+@table

    exec(@Sql)

  • RE: Bank Holiday issues

    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...

  • RE: Help with file please

    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...

  • RE: problems with spaces

    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.

  • RE: error when restoring a database

    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.

  • RE: importing in a fixed format file

    Hi, 

     

    here is the file format of one of the files that I have to import.

     

     

        1      FORENAME              ...

  • RE: importing in a fixed format file

    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...

  • RE: SQL Service won''''t start

    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.

     

  • RE: SQL Service won''''t start

    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.

  • RE: SQL Service won''''t start

    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...

  • RE: SELECT TOP X by using dynamic SQL

    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 '+@number+ ' *...

  • RE: a little help needed for a programme

    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...

  • RE: a little help needed for a programme

    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...

  • RE: deduping data in a flat file

    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...

  • RE: splitting 1 field into multiple fields

    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...

Viewing 15 posts - 16 through 30 (of 32 total)