Forum Replies Created

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

  • 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

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

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

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

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

  • RE: Just for fun Lotto SQL

    quoteAnd I'll be long dead.

    But your rants will be on this site for posterity

  • RE: Converting fields

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

    Oh yes you can

  • RE: help on query

    damn

    only seems to work for AND's

  • RE: help on query

    quotethose queries are not returning the weired desired result

    Your right

    Forgot...

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

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

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

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

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

  • RE: beginner: how to get the value in a record just created

    Not sure what you a really asking for, need better understanding of what you are trying to do.

    If [iRecipientId] is not IDENTITY then you know the value anyway

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