Viewing 15 posts - 1,156 through 1,170 (of 1,923 total)
For the explanations of the code, read the following explanations (Thanks Wayne and Skcadvre for your wonderful explanations)
http://www.sqlservercentral.com/Forums/FindPost962505.aspx and http://www.sqlservercentral.com/Forums/FindPost962922.aspx
September 15, 2010 at 4:31 am
Christy, first of all, excellent and fantastic way of posting a question, kudos to you. All things put in the right place.. awesome..
Now for the code that will do what...
September 15, 2010 at 4:28 am
:exclamation: ATTENTION Please : Two Year Old Thread
September 15, 2010 at 4:19 am
Try this:
SET NOCOUNT ON
DECLARE @Command VARCHAR(100)
SET @Command = 'dir /b /s '
DECLARE @Folder VARCHAR(100)
SET @Folder = 'D:\AS'
DECLARE @FilesInAFolder TABLE (FileNamesWithFolder VARCHAR(500))
INSERT INTO @FilesInAFolder
EXEC MASTER..xp_cmdshell @Command
; WITH CTE AS
(
...
September 15, 2010 at 4:16 am
naraayanan_1983 (9/14/2010)
I am new in SQL.I need a Query about FIFO and LIFO Method.My Table Structure is Hearder and Details.it's link to No .I have a one...
September 14, 2010 at 10:23 pm
Paul, i dint quite understand ur requirement.. did u mean, u need to hardcode a column as NULL in the SELECT ?
September 14, 2010 at 10:11 am
WayneS (9/14/2010)
@cc - thanks for helping out!
Welcome , Sheff.. 🙂
As a side note, did u prepare a solution for this? I would love to look at your piece..
September 14, 2010 at 10:06 am
vivek.verma (9/14/2010)
@ ColdCoffeeThe other code also worked well, and off course I will prefer less number of lines as it is somewhat good for speed. Thanks again
Thanks for the feedback,...
September 14, 2010 at 10:04 am
vivek.verma (9/14/2010)
Hey thanks it worked like a charm and code is also too well explained, and don't know how you got it that somewhere my requirement will be data for...
September 14, 2010 at 8:45 am
george sibbald (9/14/2010)
it is possible but why do you want to do this? sounds risky.
+1
September 14, 2010 at 8:28 am
Why not ? take a look at SQLCMD and OSQL command line commands in Books Online (free help that comes with your SQL Server Installation)
September 14, 2010 at 8:24 am
This might help you:
http://jimbojw.com/wiki/index.php?title=SQL_2005_-_Why_You_Can%27t_EXEC%28%29_Inside_a_UDF
September 14, 2010 at 8:06 am
Jeff Moden (9/14/2010)
You might want to take a gander at the simplicity of ColdCoffee's code. 😉
I was telling the OP to have a look at that from the start Jeff,...
September 14, 2010 at 7:59 am
ROFL.. LOL.. :-D... A coffee-machine break could spell disaster i guess.. FULL OUTER JOIN can accomplish that task with minimal lines of code 😀
; WITH BPM_CTE AS
(
SELECT -- List...
September 14, 2010 at 7:39 am
Viewing 15 posts - 1,156 through 1,170 (of 1,923 total)