Forum Replies Created

Viewing 15 posts - 2,821 through 2,835 (of 3,544 total)

  • RE: Need HELP on data cleaning query - simple really, just forgot syntax

    CAST(REPLACE(qtyavail,',','') as numeric(9,2)) + CAST(REPLACE(qtyavail and qtyatbranchavail) as numeric(9,2))

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

  • RE: Import CSV file with Key Fields

    Personally I would preprocess the data outside of sql then load.

    But if you want to use sql

    1. DTS the data into staging table (varchar columns as Mike suggested) including an...

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

  • RE: Can you match text rows using LIKE in a join?

    SELECT table1.name,table2.name

    FROM table1

    INNER JOIN table2

    ON CHARINDEX(table2.name,table1.name) > 0

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

  • RE: Dynamically Generate Table Name in Stored Procedure

    I agree with Frank, use a single table with id, otherwise you will have to use dynamic sql.

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

  • RE: How to copy a table in a sp

    The simple solution for copying data is

    to create the table and insert

    SELECT *

    INTO newdatabase..newtable

    FROM olddatabase..oldtable

    WHERE ...

    to insert into an existing table

    INSERT

    INTO newdatabase..newtable

    (col1,col2,col3...)

    SELECT col1,col2,col3......

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

  • RE: Can you write out multiple views automatically?

    "Btw, Access exposure can be treated, and maybe some day you will get your normal life back."

    Yeh but I hated those padded cells.

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

  • RE: Refer to a certain line of the DB

    How about this

    SELECT TOP 24

    i.codigoind,

    i.mesind,

    i.anoind,

    i.numeroind,

    (i.numeroind - m.numeroind) / m.numeroind AS 'varmesind',

    (i.numeroind - y.numeroind) / y.numeroind AS 'varanoind',

    (i.numeroind - a.numeroind) / a.numeroind AS 'vardozemesind',...

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

  • RE: Can you write out multiple views automatically?

    OK, OK, short reply just to keep you happy.  The only reason I did not respond before is that I am not well versed...

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

  • RE: Null Date

    Dates cannot contain 'empty' string, as you found out sql will set id to '1900-01-01'. If your input is not datetime (eg varchar) then use NULLIF, eg

    DECLARE @string varchar(10)

    SET @string =...

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

  • RE: Refer to a certain line of the DB

    Without structure can only guess. Assume that row contains a date and all months present then

    SELECT TOP 24 a.[date],a.CPI,

    (a.CPI / b.CPI,1) AS 'Increase'

    FROM a

    INNER JOIN ...

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

  • RE: Can you write out multiple views automatically?

    It is the drop statement not object_id that is the problem. You will have to use dynamic sql like

    SET @sql='If Object_ID(''NBP'+@yearcount+''') is not NULL Drop View NBP'+@yearcount

    EXEC(@SQL)

    SET @sql='CREATE...

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

  • RE: How to change Server collation for SQL2000?

    Having not used SQL2K (but will be soon), collation is more of a black art than a grey area for me. I thought that SQL2K allowed different collations for different...

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

  • RE: BOL Update

    My shortcut shows

    Target

    C:\WINNT\System32\hh.exe sql80en.col

    Start In

    "C:\Program Files\Microsoft SQL Server Books Online\1033\"

    The Start In dir contains

    123 File(s)     39,038,612 bytes

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

  • RE: BOL Update

    Have a look at the properties for the shortcut (if there is one) on the programs menu, it should tell you where the files are.

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

  • RE: BOL Update

    My link is

    ©1988-2002 Microsoft Corporation. All Rights Reserved.

    and shows

    Version: 8.00.002

    Gonna try your url now

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

Viewing 15 posts - 2,821 through 2,835 (of 3,544 total)