Forum Replies Created

Viewing 15 posts - 1,681 through 1,695 (of 3,544 total)

  • RE: Projection-Forecast used in a query

    Damn   I did say untested

    Replace

    SELECT DISTINCT CONVERT(char(6),DATEADD(year,10,Period),112),PolicyNumber

    with

    SELECT DISTINCT CONVERT(char(6),DATEADD(year,10,EffectiveDate),112),PolicyNumber

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Projection-Forecast used in a query

    Ooops! sorry

    Remove the a. in the first select from

    SELECT DISTINCT CONVERT(char(6),DATEADD(year,10,a.Period),112),PolicyNumber

    to

    SELECT DISTINCT CONVERT(char(6),DATEADD(year,10,Period),112),PolicyNumber

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Projection-Forecast used in a query

    At first guess and off the top of my head (untested)

    CREATE TABLE #temp (Period char(6),PolicyNumber int)

    INSERT INTO #temp (Period,PolicyNumber)

    SELECT DISTINCT CONVERT(char(6),DATEADD(year,10,a.Period),112),PolicyNumber

    FROM GE_Transaction

    WHERE Status='A' AND DATEADD(year,10,EffectiveDate) >...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: how to make the script for the triggers only in 2000

    In EM (Enterprise Manager)

    Right click on the database

    Select All Tasks / Generate SQL Script

    Click Show All

    Select All Tables (or select individual tables if required)

    Click Formatting (tab)

    Deselect the Generate CREATE /...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Identifying foreign characters in rows of data

    Another way to identify chars above ascii 127 is to use the now famous numbers table

    SELECT t.rowid, n.Number

    FROM t

    INNER JOIN [Numbers] n

    ON n.Number <= LEN([column])

    WHERE...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Identifying foreign characters in rows of data

    Depends on what 'foreign' means

    You could try PATINDEX

    PATINDEX('%[^!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~]%',somecolumn)

    which will give you the first column where char above 127 is (except for control chars as cf/lf etc and [], but would...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Just for fun Lotto SQL

    quoteAnd I'll be long dead.

    But your rants will be on this site for posterity

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Converting fields

    quote...there is no way to "query between 18:00:00 and 06:00:00'...

    Oh yes you can

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: help on query

    damn

    only seems to work for AND's

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: help on query

    quotethose queries are not returning the weired desired result

    Your right

    Forgot...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: best way to laod from text file

    So join the tables and transform the data, e.g

    You have inserted your data into a temp table as one column and you wish to update a real table using this...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: best way to laod from text file

    quote...what do you mean by SET based UPDATES...

    e.g.

    UPDATE

    SET column = value, column = value

    WHERE [condition]...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: help on query

    I would do it like this

    SELECT REGISTER

    FROM @Customers

    WHERE (@customer IS NULL OR CUSTOMER = @customer)

    AND (@id_city IS NULL OR @id_city = CITY)

    AND(@id_country IS NULL OR @id_country...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Help in bcp Utility

    Plus

    1. The file spreadsheet file must exist

    2. Each sheet referenced must exist

    3. Each sheet must have the correct number of columns in row 1 (Header Row)

    3. The data will be appended...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: best way to laod from text file

    quoteyes but i don't want to use DTS or SSIS

    The your only option is to

    1. BULK INSERT data...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 1,681 through 1,695 (of 3,544 total)