Viewing 15 posts - 61 through 75 (of 256 total)
I found it in BOL right after I posted. Thanks.
October 12, 2011 at 12:27 pm
Thanks all for your time. I have now resolved the issue but just facing one more issue of case when in where. Hopefully I will resolve it soon. Again, thanks...
October 4, 2011 at 3:01 pm
Sean,
Can you please take a look at my SP, the challenge is right at (@StartYear IS NULL AND @EndYear IS NULL)) where I need to pass...
October 4, 2011 at 2:13 pm
Here is my SP:
CREATE PROCEDURE [dbo].[myList]
(
@Id int,
@StartYear int = NULL,
@EndYear int = NULL,
@Name VarChar(50) = NULL,
@Ids VarChar(3000) = NULL
)
AS
DECLARE @query VARCHAR(8000)
SET @query = N'
SELECT ...
October 4, 2011 at 1:59 pm
Sean,
Casting does work. Now the question is how do i execute? using
EXEC (@query)
or
EXEC sp_execsql (@query)
Thanks.
October 4, 2011 at 1:54 pm
As I stated earlier, it works for IN clause, but does not work for an int variable
SET @query = N'
SELECT * from tbl where (nid = '+@ID+')
AND ID IN('+IDs+')'
It works...
October 4, 2011 at 1:01 pm
Sean,
The problem is that I cannot create a function in our database, the lead shouts. I am allowed to create only couple of stored procs.
Any other...
October 4, 2011 at 12:53 pm
Thanks all for your response. I took STurner's response and created like:
SET @query = N'
SELECT * from tbl where (nid = '+@ID+')
AND ID IN('+IDs+')'
It works for the IDS in the...
October 4, 2011 at 12:43 pm
I do not know how to ftp using cmdshell, so I wrote a webservice in .Net. Do you know a way to use cmdshell for ftp?
Thanks.
June 1, 2011 at 10:22 am
The problem was that I was having a line break within my select statement. I have it working now. Only thing that I need to do is to add column...
June 1, 2011 at 9:40 am
Yet another mistake correced from the previous statement
Why is this not working?
DECLARE @exe nvarchar(4000)
SET @exe =N'bcp '
SET @exe =@exe + N'
"EXEC SELECT...
May 31, 2011 at 1:10 pm
I missed to include "exec" in the previous statement
Why is this not working?
DECLARE @exe nvarchar(4000)
SET @exe =N'bcp exec '
SET @exe =@exe +...
May 31, 2011 at 12:35 pm
Hi Prashavhad,
Can you please give me more hint on creating bcp for this?
Thanks
May 31, 2011 at 11:48 am
Gail,
That was the answer I was looking for. Thanks.
May 19, 2011 at 10:22 am
Viewing 15 posts - 61 through 75 (of 256 total)