Viewing 15 posts - 1,141 through 1,155 (of 1,923 total)
Try this:
SET NOCOUNT ON
DECLARE @PhoneNumbers TABLE
(
ID INT IDENTITY(1,1),
TEL1 BIGINT,
TEL2 BIGINT,
TEL3 BIGINT
)
INSERT @PhoneNumbers (Tel1, Tel2, Tel3)
...
September 19, 2010 at 9:13 am
Jeff Moden (9/18/2010)
ColdCoffee (9/18/2010)
Jeff Moden (9/18/2010)
ColdCoffee (9/18/2010)
Mine runs on
OS : Windows 7 Ultimate,
SQL ...
September 19, 2010 at 12:54 am
How about this:
--: Declare local variables
DECLARE @command VARCHAR(50)
DECLARE @Folder VARCHAR(50)
SET @Folder = 'P:\Documentary'
SET @command = 'dir /b /s "'+@Folder+'"' -- Place you
-- Declare a temp table to hold...
September 19, 2010 at 12:41 am
Jeff Moden (9/18/2010)
ColdCoffee (9/18/2010)
Mine runs on
OS : Windows 7 Ultimate,
SQL ...
September 18, 2010 at 9:54 pm
Jeff, PFA the results my DESKTOP..
Mine runs on
OS : Windows 7 Ultimate,
SQL ...
September 18, 2010 at 9:36 pm
Varinder Sandhu (9/18/2010)
actually if the tables lie in different dbs
then create temp table in db X that contain the data of tableB from db Y
this way...
September 18, 2010 at 5:40 am
SPACE can do it for you
SELECT SPACE( LEN( Col1)) + Col1 from <your table>
And as Wayne suggested, u can use REPLICATE as well.. like:
SELECT REPLICATE(' ' , LEN(col1)) + Col1...
September 17, 2010 at 11:15 am
Just a suggestion : Drop the temp table in the SP before it is getting created. like :
IF OBJECT_ID('tempdb..#temp') is not null
drop table #temp
create table #temp (a int, b varchar,...
September 16, 2010 at 3:25 am
Fantastic... thanks for the appreciation EasyBoy.. 😀
September 16, 2010 at 2:39 am
Awesome feedback , Mike.. I concur completely on whatever u said about SQLServerCentral.. :smooooth:
September 16, 2010 at 2:32 am
EasyBoy (9/16/2010)
I couldnt find out what exactly the problem is.
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ')'.
DBA
Msg 208,...
September 16, 2010 at 2:24 am
Try this :
DECLARE @I INT
DECLARE @C INT
DECLARE @Name VARCHAR(800)
DECLARE @command varchar(max)
SET @I = 1
SELECT @C = COUNT(*) FROM SYS.SYSDATABASES
SET @Name = ''
SET @command = ''
DECLARE @Table_Name VARCHAR(800)
SET @Table_Name = 'DB_ROLE_'...
September 16, 2010 at 2:21 am
Saravanan, we have told a gazillion times to post the tables structures, sample data et all (i myself have told u and pointed u to the article by Jeff Moden,...
September 15, 2010 at 11:50 pm
First of all, thanks to u too for posting the question fantastically..Secondly, recursive queries, WHILE Loops will all produce the result, but the FOR XML thing is fast and furious.....
September 15, 2010 at 6:18 am
Dear Muratingol, please provide some sample data and the table structures so that we will give you what exactly you want!
September 15, 2010 at 4:32 am
Viewing 15 posts - 1,141 through 1,155 (of 1,923 total)