Viewing 15 posts - 1,501 through 1,515 (of 1,920 total)
Hi there, try this:
SELECT ISNULL(RIGHT(' '+CONVERT(VARCHAR,Title),40) , REPLICATE (' ',40))
Tell us if that worked for you!
May 18, 2010 at 6:29 am
Hi there, please move the semicolon at the end of the statement at the penultimate place.
Like this
SELECT @sql = N'exec master..xp_cmdShell ''bcp DBA.dbo.x in \\RemoteServer\e$\DIR\Filename.csv -F02 /Sservname\Instancename -T...
May 18, 2010 at 6:22 am
I can put N-Way handshaking as this:
Assume there are 4 people sitting in the room and assume they are to first hand-shake with each other, then they will pair up...
May 18, 2010 at 6:21 am
You probably wil have to use Paul White NZ's N-Way Handshaking code for your requirement!
NOTE : Jeff Moden had advised that this code contains triangular joins and we must...
May 18, 2010 at 5:07 am
Deepak, are you sure, the code i supplied dint provide any results? Cos i imported the excel data that you provided, then created teh query on top of that.. it...
May 18, 2010 at 4:50 am
Sachin , this will help you
SELECT
CASE WHEN DATEPART (HH,GETDATE()) < 4 THEN DATEADD(HH,-1, GETDATE())
ELSE GETDATE()
END [TIME]
FROM...
May 18, 2010 at 3:52 am
You have to use Dynamic-SQL for these purposes!
Something like
-- Declare and initialize the database name
DECLARE @dBName VARCHAR(20)
SET @dBName = 'MASTER'
-- Declare and initialize the query
DECLARE @QUERY VARCHAR(128)
SET @QUERY...
May 18, 2010 at 2:15 am
Deepak, let me tell u this, this was one of the longest ask i had worked on :-D, not cos' of the code, but for importing data into my machine!
Here...
May 18, 2010 at 1:09 am
To learn more about the CASE syntax, please go through the following BOL link, especially the Examples part of it
😎
May 18, 2010 at 12:24 am
NewBee, replace all of your ELSE IF to WHEN.. That syntax u used is not supported..
Hope this helps you!
May 18, 2010 at 12:21 am
Viewing 15 posts - 1,501 through 1,515 (of 1,920 total)