Viewing 15 posts - 1,741 through 1,755 (of 1,824 total)
Sounds like you are being blocked by another process.
Run your insert again
then
exec sp_whoo
You should see the Session you are being blocked by in the 'BlkBy' column.
Either kill it...
July 7, 2009 at 8:01 am
Use all dates in the format YYYYMMDD , note not YYYY-MM-DD
Two links for you
July 7, 2009 at 5:03 am
Break it down to its component parts
ie
Start with
select convert(varchar(255), D_Date, 120)
then
Select convert(varchar(10), D_Date, 120)
then
Select left((convert(varchar(10), D_Date, 120)), 13)
Which is slightly bizzare , taking the left...
July 7, 2009 at 3:45 am
I think i see what you are now saying...
Select newSequentialId()
Errors, Correct ? This obviously fails as it has no idea which table you need the sequentialId for.
If you need...
July 7, 2009 at 2:28 am
Im a bit confused by exactly what you are trying to do.
Please post DDL and a reproduction script.
July 7, 2009 at 1:15 am
Sounds like you need dynamic SQL See this link or alternatively see this link [/url] for a "catch-all" query.
Any further questions , post back again
July 7, 2009 at 1:08 am
Hi ,
This should answer your question
http://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/
July 6, 2009 at 4:44 am
No a trigger will fire on data changes to that table inside the same transaction.
Maybe you can get the trigger to insert to a log table for a job to...
July 6, 2009 at 2:45 am
All the 'Inside SQL Server' books by Lubor Kollor , Steve Kass and Itzik Ben-Gan are very good.
July 6, 2009 at 2:18 am
This is what you need
declare @User varchar(30)
Select @User ='Domain\User'
Select Case When CharIndex('\',@User) >0 Then
Right(@User,DataLength(@User)-CharIndex('\',@User)) Else @User End
Although this a better solution IMO
declare @User varchar(30)
Select @User ='Domain\User'
Select substring(@User,CharIndex('\',@User)+1,999)
Select @User ='User'
Select...
July 3, 2009 at 9:22 am
WayneS (7/3/2009)
Well Dave, it seems that you did help him. http://www.sqlservercentral.com/Forums/FindPost746898.aspx
Looking forward to when he moves on to "Chapter 2 - The Insert Statement " 🙂
July 3, 2009 at 8:47 am
Yes
by way of example
select case when 10>11 then 1 else case when 8>9 then 2 else -9 end end
July 3, 2009 at 8:42 am
Hi ,
start with this article http://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/.
I would advise against using a scalar function and create a inline table function for perfomance reasons
July 3, 2009 at 6:17 am
If 2005 +
create table temp(id int,path varchar(1024))
go
insert into temp values(1,'C:\my\')
insert into temp values(2,'C:\my\')
insert into temp values(3,'C:\my\')
insert into temp values(4,'C:\my\')
insert into temp values(5,'C:\my\')
go
with cteRow(id,path,Rownum)
as
(
Select id,path,row_number() over(partition by path...
July 3, 2009 at 3:57 am
Viewing 15 posts - 1,741 through 1,755 (of 1,824 total)