Viewing 15 posts - 4,996 through 5,010 (of 5,394 total)
You can get a Tally table from here:
http://www.sqlservercentral.com/articles/T-SQL/62867/
And then you can go with this code:
;WITH CTE AS (
SELECT n AS RangeId,
...
July 23, 2009 at 9:27 am
OK, so I suppose this doesn't look strange to anyone but me.
Thanks for your answers, bc
July 23, 2009 at 9:18 am
Try this:
Right Join it to a tally table and then remove groups for NULLs in an outer query.
July 23, 2009 at 9:00 am
Once again this is obvious...
I'm sorry, maybe I'm not able to pose my question clearly enough:
1) Why don't insert statements fail even if I try to insert 3 values in...
July 23, 2009 at 8:45 am
Yes, this is obvious.
What's less obvious is why no error is raised when insert list contains more items than the select list.
I would have expected any insert to fail...
July 23, 2009 at 8:29 am
I see that your groups are repeating with different ranges, so I guess you need groups of all consecutive values with MIN and MAX, right?
Can you post the query you...
July 23, 2009 at 5:54 am
You should have a line in your script such as:
Set someVariableName = createObject("ADODB.Connection")
That "someVariableName" is your connection object.
At some point in the script you should have something like:
someVariableName.connectionString = "yourconnectionString"
Can...
July 21, 2009 at 8:32 am
I would start investigating from the basics: does the server respond to connection attempts?
Try using a tool such as OSQL.EXE to test connectivity from the client machine you are running...
July 21, 2009 at 6:08 am
simon.ciglia (7/21/2009)
any workarround (but please dont say "openquery" ;-))
What about EXEC AT? 🙂
July 21, 2009 at 5:58 am
It's hard to answer this question without some more information.
You should provide DDL script for tables and some sample data.
I suggest you take a look at this article
http://www.sqlservercentral.com/articles/Best+Practices/61537/
and come back...
July 21, 2009 at 3:30 am
You can use something like this:
DECLARE @SQLBuffer nvarchar(4000)
DECLARE @buffer TABLE (
EventType nvarchar(30),
Parameters int,
EventInfo nvarchar(4000)
)
INSERT @buffer
EXEC sp_executesql N'DBCC INPUTBUFFER(@@spid) WITH NO_INFOMSGS'
SELECT @SQLBuffer = EventInfo
FROM @buffer
Hope this helps
Gianluca
July 21, 2009 at 3:27 am
To get a better control on how query is executed on the remote server, I suggest you use OPENQUERY instead of the four-part name syntax. What you put in the...
July 21, 2009 at 1:37 am
I suggest you put a trigger for delete and capture as much information as possibile on the delete command and put the results in an auditing table.
Just a hint to...
July 21, 2009 at 1:27 am
frecal (7/20/2009)
can i do a view that displaysid, surname, relatedto, relationtype, relatedto,relationtype, etc depending on how many there are
You can't do it with a view: it must have a fixed...
July 21, 2009 at 12:59 am
I received all email notifications during the weekend, but there's been very few posts.
I don't think this means something like "Are the posted questions getting BETTER?"
Should I start a new...
July 20, 2009 at 7:21 am
Viewing 15 posts - 4,996 through 5,010 (of 5,394 total)