Viewing 15 posts - 151 through 165 (of 315 total)
I looked at your blog entry. However, your dynamic_pivot stored procedure will not work for this example. The OP needs to have one row per fruit type & date. Which...
Failing to plan is Planning to fail
November 7, 2008 at 5:36 am
Kishore.P (11/7/2008)
use COALESCE function instead of IsNull or NullIf.
Why?
Failing to plan is Planning to fail
November 7, 2008 at 3:42 am
ggraber (11/6/2008)
I think Ken's solution is the way to...
Failing to plan is Planning to fail
November 7, 2008 at 12:58 am
Use
NULLIF(t.SoldYR2,0)
Failing to plan is Planning to fail
November 7, 2008 at 12:53 am
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/09/24/handle-isdate-with-care.aspx
Failing to plan is Planning to fail
November 7, 2008 at 12:52 am
Is that June 20, 2008 or June 01, 2008?
Failing to plan is Planning to fail
November 7, 2008 at 12:45 am
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/09/24/handle-isdate-with-care.aspx
Failing to plan is Planning to fail
November 7, 2008 at 12:42 am
Kishore.P (11/6/2008)
try like:select*
fromINFORMATION_SCHEMA.COLUMNS
whereCOLUMN_NAME = 'your column name'
go
It would return View also
Failing to plan is Planning to fail
November 7, 2008 at 12:42 am
Is this reliable?
SELECT dates FROM
(
SELECT '$.00 AIIMIE 01 2002' as dates union all
SELECT '$1,764...
Failing to plan is Planning to fail
November 6, 2008 at 6:50 am
If you want to omit time part
select * from tablea where employeeid = '00880187'
and process_date>=dateadd(Day,datediff(day,0,'2008-10-31 00:00:29.000'),0)
and process_date<dateadd(Day,datediff(day,0,'2008-10-31 00:00:29.000'),1)
Failing to plan is Planning to fail
November 6, 2008 at 6:29 am
or
select object_name(object_id) as table_name from sys.columns
where name='column_name' and objectproperty(object_id,'istable')=1
Failing to plan is Planning to fail
November 6, 2008 at 6:22 am
WHERE STATUS>''
Failing to plan is Planning to fail
November 5, 2008 at 7:38 am
pramod.chauhan (11/5/2008)
column process_date datatype is DateTimeselect * from tablea where employeeid = '00880187'
and process_date=convert(datetime,'2008-10-31 00:00:29.000',106)
Why above query gives following error
"Syntax error converting datetime from character string"
select * from...
Failing to plan is Planning to fail
November 5, 2008 at 7:37 am
It is not possible
Make use of the result
select 'delete from '+table_name from information_schema.tables
where table_type='base table'
Failing to plan is Planning to fail
November 5, 2008 at 6:30 am
EXEC dynamic_pivot
'select col3,col4 from table1 where col1=''apple''','col2','sum(col4)'
Get procedure from http://sqlblogcasts.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx
Failing to plan is Planning to fail
November 5, 2008 at 6:23 am
Viewing 15 posts - 151 through 165 (of 315 total)