Viewing 15 posts - 3,346 through 3,360 (of 3,543 total)
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
April 22, 2003 at 1:58 am
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 =...
April 17, 2003 at 9:18 am
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....
April 16, 2003 at 3:29 am
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...
April 15, 2003 at 8:58 am
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...
April 15, 2003 at 6:10 am
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....
April 15, 2003 at 2:38 am
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...
April 15, 2003 at 2:28 am
No I don't. If you click on my name in this list then you see my email address.
April 15, 2003 at 2:05 am
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...
April 14, 2003 at 4:00 am
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?
April 14, 2003 at 2:21 am
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...
April 14, 2003 at 2:12 am
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...
April 11, 2003 at 3:34 am
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...
April 11, 2003 at 3:17 am
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...
April 11, 2003 at 2:05 am
Viewing 15 posts - 3,346 through 3,360 (of 3,543 total)