Viewing 15 posts - 61 through 75 (of 314 total)
Sergiy (5/5/2009)
Just make sure you have updates statistics before you query for RowCnt from sysindexes.It does not reflect real number of records all the time.
Yes with
DBCC UPDATEUSAGE ('database_name','table_name') WITH COUNT_ROWS....
May 6, 2009 at 6:23 am
or
Select column_name from information_schema.columns
where table_name='your_table'
May 6, 2009 at 6:23 am
You cannot specify a column width on data type text.
May 6, 2009 at 6:15 am
Other method
declare @string char(12)
set @string = '200905031043'
select CONVERT (smalldatetime,stuff(stuff(@string,9,0,' '),12,0,':'))
May 5, 2009 at 7:44 am
One method is to use profiler
May 5, 2009 at 7:31 am
You may need to use this in case duplicates are allowed
SELECT ID
FROM #Test
WHERE Countries IN ('IN','AU')
GROUP BY ID
HAVING COUNT(DISTINCT Countries) =...
March 10, 2009 at 1:46 am
Rav (3/9/2009)
Thanks a lot guys. It worked.
You are welcome 🙂
March 10, 2009 at 1:32 am
Try
update DimStudent
set StudentZip = substring(StudentZip, 1, 5)
where StudentZip like '[0-9][0-9][0-9][0-9][0-9]%'
March 9, 2009 at 8:27 am
rajini1122 (3/9/2009)
Conversion failed when converting the nvarchar value 'post' to data type int.
Post the code and table structure
March 9, 2009 at 8:21 am
You need something like this
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/04/04/populating-sample-data.aspx
March 9, 2009 at 7:34 am
Here is the reason
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/01/16/beware-of-implicit-conversions.aspx
February 21, 2009 at 2:39 am
david.gray (2/20/2009)
Madhivanan (2/20/2009)
Double click the errorIt will move the cursor to the specific line
Fantastic! That is so useful.
Regards
Dave
You are welcome 🙂
February 21, 2009 at 2:25 am
amartha_dutta (2/19/2009)
Thanks a lot... Learnt a completely new stored procedure....
You are welcome 🙂
February 20, 2009 at 4:46 am
Viewing 15 posts - 61 through 75 (of 314 total)