Viewing 15 posts - 4,966 through 4,980 (of 5,588 total)
can you provide the code that you are using to delete from the excel spreadsheet? Then we can help you figure out what's going wrong.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 7, 2009 at 6:14 pm
use an Execute SQL Task, and do this:
declare @dos table (LineText varchar(100))
insert into @dos
execute xp_cmdshell 'dir <REPLACE THIS WITH YOUR DIRECTORY> /o-d /b /a-d'
select top 1 * from @dos
depending on...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 7, 2009 at 6:06 pm
Hello starunit,
Thanks for finding this little bit of code, and for coming back, finding this post, and posting the reply.
I've enhanced the code... the following code will resend all of...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 6, 2009 at 10:33 pm
Mark,
I've been running into that problem also since I got my new laptop w/ Vista. I haven't had time to check out why.
Are you running 64-bit?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 2, 2009 at 11:04 am
The DatePart and DateName functions should handle what you need to do.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 2, 2009 at 10:48 am
Yes. Just remember to initially use the print statement to examine what is actually being generated; then you can just copy that and make sure it works right.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 26, 2009 at 8:14 am
Well, I think I figured it out... I goofed.
Replace all of those "QuoteName(@field_name, char(39))" pieces of code with just @field_name.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 25, 2009 at 9:22 pm
Personally, I wouldn't worry about it. The more you use it, the more ingrained it becomes.
Do you memorize all twenty styles for converting dates/times? How about the styles for converting...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 25, 2009 at 1:50 pm
I think Charles said it the best here... "Trust, but verify". If you trust the source (like Grant mentioned), then the verify process can be abbreviated. And if you don't...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 25, 2009 at 1:37 pm
svenk7 (9/25/2009)
Insert into tw_error1
select*, @d_code
from tw_1
where @field_name is NOT NULL
AND ltrim(rtrim(@field_name)) ''
AND ltrim(rtrim(@field_name)) not in ('Y', 'N')
my prob is when I execute this proc it actually does the opposite...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 25, 2009 at 12:08 pm
Bob Hovious 24601 (9/23/2009)
update table1
set val=a2.val
from table2 a2
where table1.id = a2.id
Hey Bob... Jeff has posted about this type of update before. Basically, it's a time bomb waiting...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 24, 2009 at 6:50 pm
Jeff Moden (9/22/2009)
Keep in mind that the display is the "great equalizer"... you cannot judge real performance when returning result sets to the screen.
Jeff - excellent advice. My question is:...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 23, 2009 at 5:17 pm
Elliott W (9/23/2009)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 23, 2009 at 4:22 pm
DBAs have multiple accounts: Regular accounts are in a security group that has SA rights on the servers in that domain. Each DBA has a service account in each domain....
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 18, 2009 at 12:39 pm
This is one of the reasons to rely on checking 'equality' rather than 'inequality'.
I have to agree with others. What does the above quote have to do with the question?...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 16, 2009 at 5:24 am
Viewing 15 posts - 4,966 through 4,980 (of 5,588 total)