Viewing 15 posts - 31 through 45 (of 82 total)
is there any error
if yes what's the error
looking to your query
if you are ordering from index and then apped @orderby which is varchar then error will come
like order by...
November 2, 2012 at 6:13 am
put both table structure also(function having)
looking to your function
1)CONVERT(date,t1.datecol)
why you are converting datecol to date ? why not store in date datatype itself
how may rows both table contains?
November 2, 2012 at 5:58 am
what's your function actual doing
can you post your function
if just concating two column values with ','
then
select col1+','+col2
i am not sure you want this or not
post function then can give...
November 2, 2012 at 5:36 am
can explain in more detail what you want
also post some DDL (create table) and parameter sample which you want to pass to query
November 2, 2012 at 4:04 am
great now just you want to convert multiple row into single row using coalesce
you can do it
something like this
declare @sql varchar(max)
set @sql=COALESCE(@test + ',', '') + item
FROM ...
November 2, 2012 at 3:59 am
then also it will work lets say
insert into table2
select * from
(
select a.*
from a
inner join b on a.id=b.id
inner...
November 2, 2012 at 3:00 am
return First Match.
November 2, 2012 at 2:22 am
try " with nolock " with select query on your tables
like select * from temptable with (nolock)
November 2, 2012 at 2:17 am
Can you please post your Store Procedure ?
and also please explain what you want in more details.
November 2, 2012 at 2:14 am
i am doing query part
but for the quick response below are the steps
1)use split function fn_Split(search google you will get this one)
2)apply this split function on both 1. Existing...
November 2, 2012 at 1:45 am
is there any error ?
if yes please post error
and also please give purpose of doing this
2 thing which i have found
1)use exec(@str) instead of exec
November 1, 2012 at 11:37 pm
do you want this type of query
declare @itemlist table
(
ID INT Identity (1,1),
Descs VARCHAR(100)
)
declare @item table
(
ID INT Identity (1,1),
ItemCategoryID VARCHAR(100),
Descs VARCHAR(100)
)
insert into @itemlist
select * from
(
values
('Furniture'),
('BathroomCare')
)
a (name)
insert into @item
select * from
(
values
(1000,'a'),
(1100,'b'),
(1200,'c')
)
a...
November 1, 2012 at 11:28 pm
Just Becuase Row_Number() starts with 1 and in 1st row you want to start with 0 min
so -1 in each row
November 1, 2012 at 5:43 am
Is it what you want
declare @temptable table
(
datecol date
)
insert into @temptable
select * from
(
values
('10/28/2012'),
('10/28/2012'),
('10/28/2012'),
('10/28/2012'),
('10/28/2012'),
('10/28/2012')
)a (datecol)
select
dateadd(MI,ROW_NUMBER() over (order by datecol)-1,CONVERT(Datetime,datecol)) as DateTimecol
from
@temptable
November 1, 2012 at 5:17 am
with this query can you provide some data?
November 1, 2012 at 5:00 am
Viewing 15 posts - 31 through 45 (of 82 total)