Viewing 15 posts - 271 through 285 (of 355 total)
What do you get if you run this (after changing columns and table names appropriately)?
SELECT DISTINCT
[Code] = ASCII(SUBSTRING(LTRIM(columnName), 1, 1)),
[Character] = '[' + SUBSTRING(LTRIM(columnName), 1, 1) + ']'
FROM...
February 23, 2009 at 6:45 am
Are you sure that 1st character is a normal space (character code 32)?
declare @s1 char(10), @s2 char(10)
select @s1 = CHAR(160) + 'WDT' + CHAR(160)
select @s1, '[' + LTRIM(RTRIM(@s1)) + ']'
select...
February 23, 2009 at 6:10 am
Is there any other way where I can convert the GUID value in ASP and pass to the SQL Server to insert in the table and by using the same...
February 23, 2009 at 3:11 am
Doing it this way is slightly more flexible if you want to add more databases to your exclusion list:
DECLARE @ex_db TABLE (id int)
INSERT INTO @ex_db
SELECT db_id('DBA_Audit') UNION ALL
SELECT db_id('tempdb') UNION...
February 20, 2009 at 10:32 am
The following should fix your syntax error:
select @manufacture = SUM(run_1000) * 1.25 + SUM(make_rdy)
from tpm_ver_imp_manu_cost m
inner join tpm_manu_process p
on (m.process_id = p.process_id)
where (prod_id = @prod_id)
and (version...
February 20, 2009 at 8:49 am
Use an ISO date format for your default maximum date.
Assuming the desc2 field is a character string that contains a date/time that can be reliably and consistently converted to a...
February 20, 2009 at 7:18 am
My question is why ascii(GUID) values are same for different GUID's in SQL Server 2000. Is there any way where I can avoid this and GUID values are unique.
The ASCII...
February 20, 2009 at 6:53 am
This is the line causing the error:
select @result = ((1+@lf_group1/100)^(12/@lf_exponent)-1)*100
The ^ character represents the XOR operator in TSQL, not the exponential operator that it represents in VB. In TSQL, you...
February 19, 2009 at 4:58 pm
I think the problem is in your XPath expressions, not with the CROSS APPLY clause:
Does this give you what you are expecting?
SELECT
----level
CAST(x.y.query('../../title[1]/text()') as varchar(255)) ...
February 19, 2009 at 4:40 pm
Here are 2 different ways. Both use the table variable @monthMap
The 2nd method is pretty much the same as Milla's
declare @monthMap TABLE (
id int NOT NULL,
code char(8) NOT NULL
)
INSERT @monthMap...
February 19, 2009 at 3:30 pm
I'm not sure that this is precisely what you want, but if not you should be able to tweak it for your needs.
DECLARE @beginDate datetime
DECLARE @endDate datetime
SELECT @beginDate = '2009-02-01',...
February 19, 2009 at 12:34 pm
rncruz,
Does your Events table specify the time as well as the date of the start and end of your events, or is the time portion zero, e.g. '2009-02-03 00:00:00'?
Likewise for...
February 19, 2009 at 11:44 am
What about national holidays?
If you need to take account of these then a Calendar table where working days can be identified would be the way to go.
February 19, 2009 at 6:47 am
This UDF should do the same as your VBScript.
It is written for integers of type bigint, but will also work with integers of type int.
I have used a WHILE...
February 17, 2009 at 11:26 am
Viewing 15 posts - 271 through 285 (of 355 total)