Viewing 15 posts - 976 through 990 (of 2,894 total)
CELKO (11/2/2012)
... This is a job for a MERGE INTO statement. Here is a guess:UPDATE Something_Destination AS D
USING Something_Staging AS S
...
You wanted to use MERGE, didn't you:
MERGE Something_Destination...
November 5, 2012 at 2:56 am
Jeff Moden (11/3/2012)
... Take the negativity out and you could probably get it down to 6 months or so.
+100
November 3, 2012 at 2:03 pm
GSquared (11/2/2012)
GilaMonster (11/2/2012)
Stewart "Arturius" Campbell (11/2/2012)
Clustered indexes are best suited for those columns most frequently used in range-based searches.I would tend to disagree with that, but that's just me.
Not just...
November 2, 2012 at 10:21 am
It's possible with using Dynamic Sql. Here just a small sample, but you should be able to get your one from here:
-- that could be your proc input parameter:
DECLARE @ColumnName...
November 2, 2012 at 10:05 am
Jason Selburg (11/2/2012)
Eugene Elutin (11/2/2012)
DECLARE @sql VARCHAR(8000) = 'SELECT * FROM FROM sys.objects'
SET @sql = 'SET NOEXEC ON;
' + @sql + '
SET NOEXEC OFF;'
BEGIN TRY
EXEC...
November 2, 2012 at 9:48 am
What I can say? Have you tried to search this site?
Check it here:
http://www.sqlservercentral.com/Forums/Topic796803-338-1.aspx#bm796805
As I said, you don't need to create function for this, especially the one you have which unnecessary...
November 2, 2012 at 9:40 am
kapil190588 (11/2/2012)
I am getting the data when i run the query that you sent..
I have added condition in where statement like this:
where Compare1=Compare2
But it gives an error that:
Msg 207,...
November 2, 2012 at 9:35 am
Try this:
DECLARE @sql VARCHAR(8000) = 'SELECT * FROM FROM sys.objects'
SET @sql = 'SET NOEXEC ON;
' + @sql + '
SET NOEXEC OFF;'
BEGIN TRY
EXEC (@SQL)
END TRY
BEGIN CATCH
...
November 2, 2012 at 8:40 am
Just output the content of your @Command before executing so you can see the built SQL statement.
You can debug it and find what is wrong with it.
November 2, 2012 at 8:32 am
You don't need a function for this.
Just use Datediff:
select DATEDIFF(year,@in_DOB,GetDate())
November 2, 2012 at 8:29 am
what is inside of
@SortFieldIndex and @OrderBy ?
Looks like you are mixing dynamic and static sql together, it's not going to work...
November 2, 2012 at 6:52 am
Sean Lange (10/31/2012)
Mackers (10/31/2012)
The SQL is quite hard to read (and I have never come across case statements & cursors used like that before) but rather than using a...
November 2, 2012 at 5:31 am
Change SqlCommand.CommandTimeout to higher number. Default is 30 sec...
November 2, 2012 at 5:27 am
Is any rule for a splitting by Rid?
Will you pass Rid range boundaries as input parameters into stored proc or you will have them stored in some other table?
November 2, 2012 at 4:08 am
...
So, it does look like I'm asking the impossible - it isn't mathematically possible to turn that many characters into an integer datatype which will fit into a bigint.
Yes, exactly...
October 30, 2012 at 11:29 am
Viewing 15 posts - 976 through 990 (of 2,894 total)