Viewing 15 posts - 1,651 through 1,665 (of 3,543 total)
![]() | No loops, no cursors, no RBAR ![]() |
You just love patting yourself on...
February 16, 2007 at 8:01 am
One way to do the stream in sp is to use the sp_OA procs
DECLARE @conn int, @rs int, @st int, @f varchar(8000), @i int
DECLARE @hr int
DECLARE @sql varchar(255)...
February 16, 2007 at 7:57 am
Why? What purpose will it serve?
However, use Enterprise Manager (2000) or Management Studio (2005)
Or
Drop indexes and contraints on the table
Rename the table
Recreate the table with the additional column
Populate the new...
February 16, 2007 at 3:10 am
What do you mean by 'large' and what is the datatype of 'Text'
The usual way to do this is to use a function
CREATE FUNCTION dbo.udf_text (@ID AS int) RETURNS varchar(8000)...
February 15, 2007 at 6:35 am
SQL Server, under certain circumstances (eg CREATE / ALTER table), when generating constraint / key names, will add characters (like your example) to names to make sure they're unique
To avoid this...
February 15, 2007 at 2:36 am
![]() | You would have to create a new column, update it based on the IDENTITY column and then drop... |
February 14, 2007 at 9:01 am
REPLACE(CHAR(64+FLOOR(number/27))+CHAR(64+number-(FLOOR(number/27)*27)),'@','0')
February 14, 2007 at 6:58 am
The only other thing I can suggest is to use your original code, check that each query's syntax is correct and add the first query code to the end of...
February 9, 2007 at 9:28 am
I don't know Informix but suspect it is probably due to multiple joins using ansi-92 syntax. I think Informix requires the query like this
SELECT i.itin_booking_num, i.itin_revision_num, i.itin_delta_num, i.itin_item_id_num, i.itin_line_num,
...
February 9, 2007 at 8:53 am
make the first statement a subquery and JOIN it to the second, e.g.
SELECT i.itin_booking_num, i.itin_revision_num, i.itin_delta_num, i.itin_item_id_num, i.itin_line_num,
i.itin_parent_id, i.itin_service_type, i.itin_operator_code, i.itin_service_info, i.itin_service_class,
i.itin_departure, i.itin_arrival, i.itin_from_city, i.itin_from_city_loc, i.itin_to_city,...
February 9, 2007 at 7:05 am
bcp, by default, will treat the input file as one batch
To change the batch size use the -b parameter
e.g. -b 1
will set the batch to 1 row and will fire...
February 7, 2007 at 7:03 am
Do you mean
DATEPART(week,[date]) - DATEPART(week,DATEADD(month,DATEDIFF(month,0,[date]),0)) + 1
or is there something special about the 'week' number you want.
February 2, 2007 at 2:28 am
![]() | ...try and do your joins in the FROM... |
With apologies to Shakespeare, but could not resist
January 24, 2007 at 7:08 am
DECLARE @temp TABLE ([ID] int IDENTITY(1,1),ItemName VARCHAR(6),ItemNo INT,ItemValue NUMERIC(20, 2))
INSERT INTO @temp (ItemName,ItemNo,ItemValue)
SELECT a.ItemName,a.ItemNo,a.ItemValue
FROM @MyTable a
ORDER BY a.ItemName ASC,a.ItemValue DESC,a.ItemNo ASC
SELECT a.ItemName,a.ItemNo,a.ItemValue
FROM @temp a...
January 19, 2007 at 7:33 am
My first guess was
SELECT SUM(CAST(REPLACE(STUFF(a.A,LEN(a.A)-CHARINDEX(',',REVERSE(a.A))+1,1,'.'),',','') as float))
FROM (SELECT REPLACE(CASE WHEN CHARINDEX('-',A) > 0 THEN '-' ELSE '' END + REPLACE(A,'-',''),'.',',') AS [A] FROM [total]) a
But
what does...
January 17, 2007 at 3:31 am
Viewing 15 posts - 1,651 through 1,665 (of 3,543 total)