Viewing 12 posts - 1,036 through 1,047 (of 1,047 total)
Hi,
It should be
UPDATE table_name
SET RefreshDate = '20120822 08:00';
rather than
UPDATE cjs
SET RefreshDate = '20120822 08:00';
else it will throw error
October 5, 2012 at 1:56 am
Hi,
I run the similar query and I didnt get the any error.
create procedure abc as
select x.id,y.name1 from name1 x
inner join Practice.dbo.name1 y ON x.id=y.ID
Command executed successfully
EXEC abc
Result- it returns the...
October 5, 2012 at 1:48 am
Hi vivek,
SELECT SUBSTRING(ageatdeath,0,CHARINDEX('Y',ageatdeath,0)) AS AGE_VAL,
SUBSTRING(ageatdeath,CHARINDEX('Y',ageatdeath,0),LEN(ageatdeath)) AS AGE_UNIT
this code also works fine.
October 5, 2012 at 1:38 am
You haven't specify the length of datatype in "DECLARE @myVariable AS varchar" that's why it is giving 1 as output.
October 4, 2012 at 12:24 am
how Casting or converting a string literal behaves returning 30 characters.
this is the only thing on which am stuck..
plz explain
October 3, 2012 at 6:17 am
How in case of
LEN(CONVERT(VARCHAR,@a)) AS 'Converted'
, LEN(CAST(@a AS VARCHAR)) AS 'Cast'
It is returning 30?
Can you plz exlpain.
October 3, 2012 at 4:04 am
declare @a varchar(5)='56767'
select LEN(@a)
It will result into 56767.
DECLARE @a VARCHAR ='xyz'
SELECT
LEN(@a) AS 'Declared'
, LEN(CONVERT(VARCHAR,'xyz')) AS 'Converted'
, LEN(CAST('xyz' AS VARCHAR))...
October 3, 2012 at 3:37 am
can anyone explain me why select len(@a) as 'declared' gives output as 1
October 2, 2012 at 11:31 pm
I have a table CityMaster, LocationMaster and Location table from another database. In LocationMaster CityID (int) is stored while in Citymaster (CityID, CityName, StateID) fields are stored, in Location CityName...
October 2, 2012 at 1:57 am
DECLARE @Date1 DATETIME = '2012-08-28 11:53:00'
select cast(@Date1 AS int)
It gives the result 41147. Can anyone tell me how this conversion is done.
October 2, 2012 at 12:25 am
Viewing 12 posts - 1,036 through 1,047 (of 1,047 total)