Viewing 15 posts - 6,961 through 6,975 (of 13,469 total)
ok here's a full emaaple then, all in TSQL:
this is getting every *.txt file in four different folders, and inserting them all into the same table.
my table "BULKACT" would be...
August 12, 2011 at 8:48 am
would the table already exist that you want to import into?
would all the csv files be the same format?
if the above two things are true, you could use xp_cmdshell to...
August 12, 2011 at 8:34 am
--if you are going to put this in MASTER, and want it to be able to query
--each database's sys.columns, you MUST mark it as a system procedure:
--EXECUTE sp_ms_marksystemobject 'sp_UglySearch'
August 12, 2011 at 8:23 am
Sean's so right on this...this is not a production tool.
if you have a MillionBillionRow table, and it has 15 varchar columns...it's going to tablescan that table 15 times.
this is...
August 12, 2011 at 8:17 am
sp_msForEachDB ' SELECT ''?'' AS DBName, name As UserName from ?.sys.database_principals'
August 12, 2011 at 7:33 am
here's the BOl article about it:
http://msdn.microsoft.com/en-us/library/ms142491.aspx
the xml example that we talked about would look like this, i think:
<expansion>
<!--first word is our keyword, all the others are...
August 12, 2011 at 6:20 am
BinaryDigit (8/12/2011)
I have the full word 'Jenny' in the table will adding to the thesaurus be able to make me search for 'jen' and get 'Jenny'?
yes exactly. in your example,...
August 12, 2011 at 6:07 am
anything not in the stop list is searchable...but you might want to look at the thesaurus, where you can add cross references for words that don't exist in your data.
a...
August 12, 2011 at 5:43 am
Sachin Nandanwar (8/12/2011)
But I was thinking of a scenario where there are 10 users and all these 10 users have different set of permissions where in by no 2 users...
August 12, 2011 at 5:35 am
you mean besides Books Online?
http://msdn.microsoft.com/en-us/library/ms162802.aspx
from my snippets:
EXECUTE master.dbo.xp_cmdshell 'sqlcmd -Q "SELECT * FROM AdventureWorks.Person.Contact" -o MyOutput.txt'
EXECUTE master.dbo.xp_cmdshell 'bcp "SELECT FirstName, LastName FROM AdventureWorks.Person.Contact ORDER BY LastName, Firstname" queryout Contacts.txt -c...
August 11, 2011 at 11:06 am
of the 273 future keywords on that list, 78 of them appear with syntax highlighting in SSMS 2008...and many of them are what i'd consider reserved words....datatypes like int and...
August 11, 2011 at 11:03 am
.NET has a bulkCopy object you can use.
you need to read the data into a datatable first, and like bcp, the table has to exist as well.
here's a translated from...
August 11, 2011 at 9:26 am
what you are seeing is how NULss are treated;
they are undefined, so you cannot compare them;
you need to handle the NULL values logiclaly, like with an isnull
or in...
August 11, 2011 at 8:45 am
SQL is a little different when it comes to CASE statements.a case statement returns a VALUE. it's only used for data elements.
if you need to do a logical decision, you...
August 10, 2011 at 11:24 am
restore the database to a point prior to when the developer entered the data? or delete the data as he surmised?
that's the onyl two things i can think of.
August 10, 2011 at 9:44 am
Viewing 15 posts - 6,961 through 6,975 (of 13,469 total)