Forum Replies Created

Viewing 15 posts - 1 through 15 (of 27 total)

  • RE: Complex update required

    My code now takes the form:

    ALTER PROCEDURE Populations_1991_onwards

    AS

    if exists(select 1 from INFORMATION_SCHEMA.tables where table_name = 'Populations_PREP') DROP TABLE Populations_PREP;

    -- Create table with correctly defined fields

    CREATE TABLE [Populations_PREP] (

    [Key_m] [int]...

  • RE: Complex update required

    Fair point,

    I have updated the original post. Don't worry I think that I have nearly fixed all the problems.

  • RE: Converting from varchar to numberic

    There was some duff data in the table. Sorry about that.

  • RE: Complex update required

    I'm nearly there with the following:

    ALTER PROCEDURE Populations_1991_onwards

    AS

    --EXEC Populations_1991_onwards

    if exists(select 1 from INFORMATION_SCHEMA.tables where table_name = 'Populations_PREP') DROP TABLE Populations_PREP;

    CREATE TABLE [Populations_PREP] (

    [Key_m] [int] IDENTITY (1, 1) NOT FOR...

  • RE: Complex update required

    I've edited my post. Thanks.

  • RE: Converting from varchar to numberic

    That has helped me find the problem. Thanks.

  • RE: Converting from varchar to numberic

    ALTER PROCEDURE Populations_1991_onwards

    AS

    CREATE TABLE [Table_name] (

    [Key_m] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL ,

    [GeographicCode] [varchar] (10) COLLATE Latin1_General_CI_AS NULL ,

    [Year_census_estimate] [int] NULL ,

    [Sex] [int] NULL ,

    [Age_start]...

  • RE: Converting from varchar to numberic

    The error that I get when I try to manually update the table is:

    'Table_name' table

    - Unable to modify table.

    ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type...

  • RE: Parsing strings

    ,'2006','2007')

    .... what is that bit for?

  • RE: Parsing strings

    Mark Green (4/28/2008)


    I don't need to determine if this is a one or two month string. They are all two digits to represent a month. Would it be...

  • RE: Parsing strings

    They are detailed above.

  • RE: Parsing strings

    It doesn't seem to recognise the format that I am working with (as detailed above).

  • RE: Parsing strings

    I don't need to determine if this is a one or two month string. They are all two digits to represent a month. Would it be better to...

  • RE: Alternative to while loop maybe?

    With what you have just written here, if I select the region as well as the SM figure, for each case. I could then do an inner join to...

  • RE: Alternative to while loop maybe?

    That is very similar to what I started with. I'll go back to your complex code then.

Viewing 15 posts - 1 through 15 (of 27 total)