Forum Replies Created

Viewing 15 posts - 3,346 through 3,360 (of 3,543 total)

  • RE: dts import

    Use either DTS or bcp (preferred) depending on format of data (ie quoted data, field length).

    Edited by - davidburrows on 04/22/2003 01:58:56 AM

  • RE: Lots of fields

    Use a while loop

    create table tblnames (nam varchar(20))

    declare @s-2 varchar(1000),@i int

    set @s-2 = 'John,,Mike,,,Sue,,'

    set @i = charindex(',',@s)

    while @i>0

    begin

    if left(@s,@i-1) <> ''

    begin

    insert into tblnames values (left(@s,@i-1))

    end

    set @s-2 = right(@s,len(@s)-@i)

    set @i =...

  • RE: Lots of fields

    Depending on what calls the proc you could put the 25 fields into one separated by commas and then parse this in the proc into a temp table for joining....

  • RE: Slight modification needed

    Ah I think the fog is beginning to clear a bit. I understand the tblprojecttasks table now and it should not give you an problems. I personally do not put...

  • RE: Slight modification needed

    I am still not certain where the problem lies. You use the NettblProjectTasks table to control what tasks belong to a project and what status the task is, e.g.

    Project_ID TaskID...

  • RE: Query to return only populated columns

    The only way I can see is to summarise the data to see which columns are null or not null and then create sql from the results and use sp_executesql....

  • RE: Slight modification needed

    Are you saying that you cannot call the proc more than once? Are you getting errors from the proc? What do you mean by 'because that status is no longer...

  • RE: some rows of data are missing during data transfer

    No I don't. If you click on my name in this list then you see my email address.

  • RE: some rows of data are missing during data transfer

    I can load spreadsheet into table with or without commas in text, DTS is not processing the commas as delimiters.

    Is the table you loading a permanent table?

    If you email me...

  • RE: Update query with a join

    Yes like this

    UPDATE t1

    SET t1.Field = t2.field

    FROM 1stTable t1

    INNER JOIN 2ndTable t2 ON t2.Field = t1.Field

    but is this really a DTS question?

  • RE: Quaterly Data from Selected Range

    DECLARE @d1 AS char(6)

    DECLARE @d2 as char(6)

    SET @d1 = '200001'

    SET @d2 = '200203'

    SELECT YEAR(period) AS 'Year',DATEPART(quarter,period) as 'Quarter',

    SUM(composite) AS Composite_Total

    FROM tablea

    WHERE CONVERT(CHAR(6),period,112) between @d1 and @d2

    GROUP BY YEAR(period),DATEPART(quarter,period)

    ORDER BY YEAR(period),DATEPART(quarter,period)

    Edited...

  • RE: Yearly data from Selected Range

    Nice one Antares.

  • RE: Select the Top 100 rows in a group by

    This type of query is becoming more common. I seem to remember this type in this forum before and can't remember if there was an easy solution.

    My immediate thought was...

  • RE: Yearly data from Selected Range

    If I read you right then from your example of 200103 to 200303 you want

    2002 sum value 200103 to 200203 inclusive

    2003 sum value 200203 to 200303 inclusive

    then I would use...

  • RE: Importing Data

    Not sure if this helps or not. SQL only stores decimal data type, numeric is a synonym for decimal. If you create a table with numeric data type sql will...

Viewing 15 posts - 3,346 through 3,360 (of 3,543 total)