Viewing 8 posts - 436 through 443 (of 443 total)
How about COALESCE
Declare @vc as varchar(max)
Select @vc = COALESCE(@vc + ',','') + EmployeeName from tEmployee
Select @vc
Also, you can use where clause to filter the Select statament
July 10, 2008 at 12:05 am
DECLARE @MyDate datetime
SET @MyDate = '1994-08-01 00:13:00.000'
-- Converting date to varchar gives you option to convert in the
--required format and then convert back to the datetime for future
--referance...
July 9, 2008 at 5:34 am
I executed the code on my SQL Server and found no error (SQL Server 2005 Ent). Also, the insert statement executes according to the conditions.
July 4, 2008 at 5:35 am
Thanks for the reply...
Actually, I am passing XML from the trigger. This XML consists of data from the Inserted and deleted virtual tables.
I dont know how will I embed the...
June 14, 2008 at 1:37 am
I hope this will help you
OR At least will give a solid clue to your solution...
--I created the following structure table and inserted the rows as required...
CREATE TABLE [dbo].[tblDR](
[Date_t]...
June 9, 2008 at 12:55 am
As far as I understood your problem...
CREATE TABLE [dbo].[tblABC](
[C1] [varchar](50) NULL,
[V1] [varchar](50) NULL
)
Declare @sSqlC varchar(1000)
select @sSqlC = COALESCE(@sSqlC + ',','') + ' ''' + cast(tblABC.[V1] as varchar(20)) + ''' As...
June 4, 2008 at 10:21 pm
Check this out...
Declare @sSqlC varchar(1000)
select @sSqlC = COALESCE(@sSqlC + ',','') + ' ''' + cast(tblDating.[Date] as varchar(20)) + ''' As Col' + cast(tblDating.id as varchar) from tblDating
set @sSqlC = 'Select...
May 14, 2008 at 11:27 pm
Yes... initially the replication starts and I have also witnessed the status as ruuning some script files. But after running few script files, error is shown as mentioned in Problem...
February 15, 2006 at 2:59 am
Viewing 8 posts - 436 through 443 (of 443 total)