Multiple field terminators in BULK INSERT or BCP
Can i have multiple field terminators in BULK INSERT or BCP commands i,e, define more than 1 for a file?Pls provide example.
View ArticleDate Conversion
I have a column called Month in 11/01/2013(mm/dd/yyyy) and now I need to convert in 201311 format(YYYYMM).How do I do that?SPPandey
View ArticleSQL Date Conversion
I have a date in text form in Excel like 41579,41609 but now I need to convert that to date form(YYYYMM) like 201311 ,201312 etc.Can somebody help me to figure this out?I used :Convert...
View ArticleCombining 2 SELECT statements for converting IP numbers to IP address
What I am trying to do here is get a list of clients with their IP address but SQL IP is in decimal encoded format. Running the below query is returning errors. How can I modify the query to run as one...
View ArticleHow to do partition on a non clustered index column?
I have table ORDERS .Where there are Million rows in it .I need to add Pationed Index on Order to store data in one of two files based on the new IsLocked field.But when i checked table there is a Non...
View ArticleHelp in SQL database remove duplicate fields
I have different tables like Employee, mentor_offer, department and criteria. Employee has all the employee details and department has the id and name of all the departments, Criteria has id and name...
View ArticleSQL
Hoping someone can point me in the right direction.I currently manage a few Access databases within the company I work for. These databases are nearing their 2GB limit.I am looking to move them over to...
View ArticleHow can I write this query In parameterize form so That I can prevent sql...
String strQry ="INSERT INTO tblVoucherType (VhrTypeCode,moduleCode,transCCode,"+"voucherType,OrderNumber,active,AccountId) "+" values('"+ txtVhrCode.Text+"','"+...
View ArticleHow do I execute a PowerShell Script
I've googled this, and found arguments as to "why would you do that, blah blah blah"So please don't ask me why; this is just the way I was told to do it until we can get our SQL DB Mail working. Our...
View ArticleMy trigger doesn't seem to be saving after I modify it
So I had a trigger that I needed to modify (extensively). It now does 1 thing instead of 10 things.I hit the EXECUTE button and it gives me the following error:Msg 2714, Level 16, State 2, Procedure...
View ArticleSQL Server 2008 R2 enterprise evaluation edition download link
Hello Everyone...I am unable to find a download link for downloading SQL Server 2008 R2 Enterprise Evaluation Edition.I request someone to help me.Thanks and Regards, Readers please vote for my posts...
View ArticleDBCC shrinkdatabase doesn't work
Hi everyone,I have a SQL 2k5 instance and I want to shrink a database using "dbcc shrinkdatabase (databasename, truncateonly)"(I could see there were a lot of unused space there). However, the scripts...
View Articledata is not loading in ado.net destinaton from flat file source.
HiWhile loading the data from flat file to ado.net destination getting an error as below. here i am using visual studio 2010[ADO NET Destination [2]] Error: An exception has occurred during data...
View ArticleHow to upgrade from MSDE to SQL Express 2012
Hello, I was wondering if/what the procedure might be if you want to upgrade from MSDE to SQL Express 2012? Do we have to upgrade to SQL Express 2005/2008 first to do the upgrade or is there a...
View ArticleProblems with Website using WebMatrix and SQL Server Database 2012
I am working on my project on WebMatrix and SQL Server database. At the moment I have achieved the following:Created a webpages (i.e. Login Page, Sign Up/Register page for the websiteCreated a...
View Articleget selected data from one db to another db
Hi,In sql server I have two different databases .In database1 I have two tables(das1(client ID's FK) and clients1(ID PK) )with primary foreign key relationships.In database2 I have same tables with...
View Article4 CPU server - add 5th for OS?
Good day all.We had an issue today that cause a DB server (4 CPU SQL VM) to run at 100% CPU load. I was able to get onto the RDP session but then it was too hard to navigate around due to slow...
View ArticleForce DATE data type to mmddyyyy
Hi All,Can we force DATE data type column to save data as mmddyyyy always. Thanks,Nihar
View ArticleConvert DATE type
CreateFUNCTION [dbo].[dates](@strDateNVARCHAR(10))RETURNSDateASBEGIN DECLARE @strInputDate VARCHAR(10) DECLARE @strOutPutDate Date DECLARE @strLen INT SELECT @strInputDate...
View ArticleAdd service account as a login for my database
Hello,I am expering difficulties to add my "local system" account as a valid login for my SQL (localDB)\v11.0 development server.This is my development environment where I am creating a windows service...
View Article