Viewing 15 posts - 2,536 through 2,550 (of 5,504 total)
The task seems to be straightforward.
What would you need the dynamic sql for?
Couldn't you just pass the VARCHAR(MAX) value, the @where variable and the call of fnDelimitedSplit to the dynamic...
November 23, 2010 at 3:41 pm
Is there any specific reason for using the least preferred method?
November 23, 2010 at 3:33 pm
LutzM (11/23/2010)
Alvin, that's what you look like when you've had time to shave?!? 😀But isn't that counterproductive regarding hunting season?
LOL! True. Didn't consider that "alternative". Glad I'm in Europe. Might...
November 23, 2010 at 2:54 pm
Alvin, that's what you look like when you've had time to shave?!? 😀
But isn't that counterproductive regarding hunting season?
November 23, 2010 at 2:47 pm
Digs (11/23/2010)
I have a need to Script a where clause from client side and send it to the server to execute in dynamic sql.
The issue is that the table...
November 23, 2010 at 2:37 pm
@Ron:
I guess the OP is all yours from now on. 😉
At least (s)he's letting you know that you're getting closer...
In order to get the monthla split I'd probably use a...
November 23, 2010 at 2:23 pm
I'm getting confused...
First you posted table def for [Tenants] and [Buildings] including sample data. Good point to start with...
When I asked what you've tried so far you posted different DDL...
November 23, 2010 at 12:41 pm
You can't use a GROUP BY within your update statement directly.
It's not really clear what you're looking for, but due to the GROUP BY aggregation I have to assume you're...
November 23, 2010 at 12:26 pm
So, what have you tried so far?
November 23, 2010 at 10:10 am
GSquared (11/22/2010)
Would adding a row_number() column (that's a function) do what you need?
@shyaagi: The row_number() approach requires to specify a column that would define the order.
Unfortunately, I cannot find an...
November 22, 2010 at 4:04 pm
Please see BOL (BooksOnLine, the SQL Server help system usually installed together with SQL Server) for the correct syntax (SET before FROM part):
UPDATE [dbo].[progoogle]
...
November 22, 2010 at 3:47 pm
Ok, let's start at the very beginning:
How long does it take to run the code in SSMS that is called within the job?
If it consists of independed code blocks: How...
November 22, 2010 at 2:03 pm
wannalearn (11/22/2010)
The status is in progress but it is continously trying to run the job for last 2 minutes.
vs. previous post
wannalearn (11/22/2010)
the status is failed..
Please tell us the error...
November 22, 2010 at 1:06 pm
pavan_srirangam (11/22/2010)
one last question
If I add more .ndf files to the database will reduce pagelatch_up waits and resource is 5:1:3 no.
Because I found there are...
November 22, 2010 at 12:58 pm
You would need dynamic SQL for this. Something lik the following:
DECLARE @database NVARCHAR(128)='dbDRCT_1'
DECLARE @sql NVARCHAR(2000)
SET @sql='SELECT *
FROM ' + @database +'.dbo.tblAuditMasterLog'
PRINT @sql
--EXEC (@sql)
November 22, 2010 at 12:27 pm
Viewing 15 posts - 2,536 through 2,550 (of 5,504 total)