Getting started with SQL Server ForumNew to SQL Server? Beginners just getting started - here's the place for help with simple questions. For installation or setup questions, refer to the Setup Forum.© 2009 Microsoft Corporation. All rights reserved.Sat, 28 Nov 2009 05:42:02 Z13e5c981-20c0-47db-9df8-5bf7aae3a479http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4c98e5f2-1fa1-4f34-b132-a095bc9c2a92http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4c98e5f2-1fa1-4f34-b132-a095bc9c2a92Peter Stonehttp://social.msdn.microsoft.com/Profile/en-US/?user=Peter%20StoneI need some opinions about storing text or Word documents in SQL serverI'm developing a website database in Microsoft Access, but my design needs to based on migration to SQL Server (at which point I will contract some professionals).<br/> <br/> 1. Most records will contain a significant amount of text.<br/> 2. I want to automate the procedure of opening and saving a text document within the forms.<br/> <br/> What's the best way of storing and retrieving the text? For my purposes MS Word is an excellent text editor, but I'm open to any suggestions. In Access, the ability to view OLE objects (i.e. Word documents) in the form is handy.<br/> <br/> Most records would have 1,000-2,000 characters with occasionally 10,000-15,000 characters.<br/> <br/> Thanks PeterThu, 26 Nov 2009 03:34:12 Z2009-11-28T02:54:34Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/6c63adef-b11f-4674-b960-ecb32b6598d1http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/6c63adef-b11f-4674-b960-ecb32b6598d1tp99http://social.msdn.microsoft.com/Profile/en-US/?user=tp99SQL 2008 T-SQL and MS Access 2007 SQL (ANSI) Compatibility<p>Hi Everyone,<br/><br/>Hoping someone can assist me with this question.<br/><br/>We have an Access DB that was originally created with Access 2003, and then was recently converted to work with Access 2007.  We are now in the process of preparing to migrate the Access 2007 DB to a SQL Server Standard 2008 server DB.  This will be a brand new SQL Server DB.  The current desktop operating system is windows XP SP3.  Following is the proposed architecture for the new setup:<br/><br/>The architecture will be an Access 2007 front-end Linked to a SQL Server 2008 Standard edition Back-End.  The Front-End will use Access 2007 Run-Time for Forms and Reports.  The back-end will store all the data (tables, stored-procedures, etc.).  The desktop operating system is Windows XP SP3.<br/><br/>Following are the questions I have:<br/><br/>1. Are the Access 2007 SQL Datatypes and commands compatible with T-SQL Datatypes and commands within SQL Server 2008 Standard Edition ?<br/><br/>2. Can you please suggest the best practices and any additional information when using Access 2007 as a Front-End and SQL Server 2008 Standard Edition as a Back-End.<br/><br/>Your help is MUCH appreciated !<br/><br/>Thanks,<br/><br/>Jason</p>Thu, 26 Nov 2009 18:02:04 Z2009-11-28T01:55:15Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/84f78c31-d914-41b8-a5ea-5ac565f76f6ahttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/84f78c31-d914-41b8-a5ea-5ac565f76f6aRajganesh.dbahttp://social.msdn.microsoft.com/Profile/en-US/?user=Rajganesh.dbaSQL 2005 - Update statistics,DBCC job statusHi ,<br/><br/> Can anyone tell me any DMV or query to find the status of update statistics job is running currently in which table in SQL 2005 and also queries to find out DBCC job statusFri, 27 Nov 2009 09:31:13 Z2009-11-27T22:15:35Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/113a9c5a-0cf8-41ab-baed-a577d5f883fchttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/113a9c5a-0cf8-41ab-baed-a577d5f883fckrrish03http://social.msdn.microsoft.com/Profile/en-US/?user=krrish03tru or false<br/> Microsoft Award Team.<br/> Baley House, Har Road<br/> Sutton, Greater London<br/> SM1 4te United A Kingdom.<br/> Batch: 12/25/0340<br/>Fri, 27 Nov 2009 15:33:52 Z2009-11-27T15:48:13Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/abcfd7ae-0167-4926-8c17-820d594697e7http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/abcfd7ae-0167-4926-8c17-820d594697e7NickMazhttp://social.msdn.microsoft.com/Profile/en-US/?user=NickMazImport Foxpro 2.6 data tables into MSSQL 2005<p>Hi,<br/><br/>I'm looking for a way to import the data, periodically from Foxpro 2.6 data tables into MSSQL 2005, are the any tools that exist?<br/><br/>Thanks<br/><br/>Nick</p>Fri, 20 Nov 2009 16:00:35 Z2009-11-27T15:26:28Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/e52c60aa-b0ed-49be-beb5-40d9535fbb9dhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/e52c60aa-b0ed-49be-beb5-40d9535fbb9dodeddrorhttp://social.msdn.microsoft.com/Profile/en-US/?user=odeddrorClass does not support aggregation<P>Class does not support aggregation (or class object is remote) (Exception from HRESULT: 0x80040110 (CLASS_E_NOAGGREGATION)) (Microsoft.SqlServer.SqlTools.VSIntegration)</P> <P><BR>Program Location:</P> <P>&nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.ISqlToolsVSHlpFactory.CreateHierarchyWrapper(Guid&amp; clsidInnerHier)<BR>&nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.SqlWorkbenchHierarchy.CreateHierarchyWrapper(Type typeToWrap, ILocalRegistry localReg)<BR>&nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.get_SqlVirtualProject()<BR>&nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.InvokeDesigner(IManagedConnection connection)<BR>&nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.Invoke()Hi there,<BR><BR>I'm using SQL Server 2005 Dev. with Windows XP Pro. SP2.<BR>50GB free space with 1GB of RAM<BR>After I installed SQL Server with no problems.<BR>I tried to open a table in AdventureWorks database and I'm getting an error:<BR></P> <P>Could some one tell me what is going on ?<BR><BR>Thanks an advanced<BR><BR>Oded Dror<BR>Email: <a target="_blank" title="mailto:odeddror@cox.net" href="mailto:odeddror@cox.net"><FONT color=#0000ff>odeddror@cox.net</FONT></a><BR></P> <P>&nbsp;</P>Fri, 23 Dec 2005 04:29:55 Z2009-11-27T15:06:43Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/76f10602-e42c-46bc-9433-4685ddfacd6chttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/76f10602-e42c-46bc-9433-4685ddfacd6cDeepatel70http://social.msdn.microsoft.com/Profile/en-US/?user=Deepatel70SQLServerAgent not starting<span id="_ctl0_MainContent_PostFlatView"></span> <span><p>Hi all,</p> <p>I have a maintenance plan on SQL2000, that is backing up the database.</p> <p>It is under Management/SQL Server Agent. When I try to start the job, I got an error, saying: <font color="#ff0000">Error 22022 SQLServerAgent is not currently running so it cannot be notified of this action.</font> </p> <p>But, when I try to start the SQL Server Agent (in Services), it stops directly with the following information: <font color="#ff0000">The SQLAgent$Sharepoint service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.</font> </p> <p>When I try to start it from the SQL Server Service Manager: no reaction at all!</p></span>Mon, 27 Feb 2006 14:46:50 Z2009-11-27T14:04:51Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/5b28929e-9d9a-4345-a3a8-09dccdd6cd85http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/5b28929e-9d9a-4345-a3a8-09dccdd6cd85Gnanasekar babu - MCADhttp://social.msdn.microsoft.com/Profile/en-US/?user=Gnanasekar%20babu%20-%20MCADDo CTE improves performance?Hi,<br/><br/>Will CTE improve the performance when quering from a large database. Kindly please provide me the information.<br/><br/>Thanks,<br/>Gnanasekar BabuFri, 27 Nov 2009 10:33:04 Z2009-11-27T18:49:53Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/c9dbe3ea-6d78-4e06-a2a4-453826b622a1http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/c9dbe3ea-6d78-4e06-a2a4-453826b622a1ChristinaInDenverhttp://social.msdn.microsoft.com/Profile/en-US/?user=ChristinaInDenverUsing Query Graphical Tool Then Copying Column Headings<span style="font-size:medium;color:#000000;font-family:Geneva, Arial, Sans-serif"><span style="font-size:small">I have a client that just started using SQL 2005 and is used to being able to copy the results of a query built with the GUI view builder in 2000.  In SQL 2005, the column headings are not included.<br/><br/>I always use the text queries and unable to find a solution for her.  I know of the option that exists in the Options &gt; Query Results &gt; Results to Grid &gt; Include column headings, but that does not work with the result of a </span></span><span style="font-size:medium;color:#000000;font-family:Geneva, Arial, Sans-serif"><span style="font-size:small">VIEW vs. a Query.  (Nor does it work with an Open Table)</span></span> <p class=MsoNormal><span style="font-family:Tahoma,Helvetica,Sans-Serif"><span style="color:#000000"><span style="font-size:medium"><span style="font-size:10pt;color:navy;font-family:Arial">The idea is that when I setup a view it’s a drag/drop type of query building (query building for dummies if you will).  </span><span style="font-size:10pt;color:navy;font-family:Arial">Once I have a view and click the Execute icon it will return all the records selected by the View.  However, when I click the upper left/top box to select all rows and column and then try to copy/paste the records into Excel all the data copies just fine but the field name/column headers are not there.</span></span></span></span></p> <p class=MsoNormal><span style="font-size:10pt;color:navy;font-family:Arial"><span style="font-size:medium;color:#000000;font-family:Geneva, Arial, Sans-serif"><span style="font-size:small">How can I get the header fieldname data to copy/paste from View result set that I'm able to copy from a Query result set?  Hopefully there is a simple solution out there that I have just not run accross, yet.</span></span></span></p>Wed, 25 Nov 2009 18:48:01 Z2009-11-27T07:22:44Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4ba7d1df-0535-494e-accf-564ec891ccechttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4ba7d1df-0535-494e-accf-564ec891ccecch3nyonghttp://social.msdn.microsoft.com/Profile/en-US/?user=ch3nyongConnecting from APP to DB server giving TCP Provider, error: 0<strong>Setup: </strong> APP server (Win Server 2008, IIS7) and DB server (Win Server 2008, SQL 2008)<br/> <br/> <strong>What Works:</strong> <br/> <br/> Running &quot;SQL Server ODBC Data Source Test&quot; connecting to DB server returns &quot;TEST COMPLETED SUCCESSFULLY&quot;<br/> <br/> <img src="http://172.31.254.243/img98.imageshack.uss/img98/2333/error2a.jpg" alt=""> <br/> <br/> <strong>What Fails:</strong> <br/> <br/> Connecting from Ms SQL Server Management Studio on APP Server to DB Server returns the following error<br/> <br/> <img src="http://172.31.254.241/img9.imageshack.uss/img9/3035/error1ic.jpg" alt=""> <br/> <br/> <strong>Trials made with no lucks:</strong> <br/> <br/> - Checked &quot;Allow remote connections to this server&quot; on DB Server<br/> - Increasted Remote Login Timeout to 600<br/> - Disabled connection pooling on ASP.NET connection string<br/> <br/> <strong>One strange thing to note:</strong> <br/> <br/> 1) when connecting to DB server using ASP.NET code and trying to execute a stored procedure that list out all fields of one row record from one table, it gives the same error as shown in above screen capture<br/> <br/> 2) but when changing to execute a stored procedure that list out one field of one row record from one table, the ASP.NET code was <strong>successfully </strong> executed!<strong><br/> </strong> <br/> 3) it seems like the error will occur if returning data is larger than a certain size (in which the size is real small! almost like... a network packet size?)<br/> <br/> <br/> any help would be very much appreciated!! <br/> <br/> thanks in advance!!<strong></strong>Fri, 20 Nov 2009 16:55:49 Z2009-11-27T03:12:00Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/a5bfe3d4-e84d-431c-bc0d-d12de30413dehttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/a5bfe3d4-e84d-431c-bc0d-d12de30413deShemoPThttp://social.msdn.microsoft.com/Profile/en-US/?user=ShemoPTProblem Creating SQL DatabaseHello, <div>I am building a database in SQL where I want to have following columns</div> <div><br/></div> <div>ID - integer</div> <div>username - text</div> <div>Password - text</div> <div><br/></div> <div>in MySQl I was using  Type- <span style="font-family:sans-serif;font-size:13px;white-space:nowrap">int(11)  that was - auto_increment, was generating ID on it's own.</span></div> <div><span style="font-family:sans-serif;font-size:small"><span style="font-size:13px;white-space:nowrap">how can I do this in MS SQL?? which  type should I use for ID?? </span></span></div> <div><span style="font-family:sans-serif;font-size:small"><span style="font-size:13px;white-space:nowrap">I tried   - int -- but it required 32 digit number </span></span></div> <div><span style="font-family:sans-serif;font-size:small"><span style="font-size:13px;white-space:nowrap">I tried  uniqueidentifier- but also not warked</span></span></div> <div><span style="font-family:sans-serif;font-size:small"><span style="font-size:13px;white-space:nowrap"><br/></span></span></div> <div><span style="font-family:sans-serif;font-size:small"><span style="font-size:13px;white-space:nowrap">here is the picture <a href="http://img689.imageshack.us/img689/5808/registerform.png">PICTURE</a></span></span></div>Thu, 26 Nov 2009 20:58:54 Z2009-11-26T23:13:14Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/fa4d0f85-d286-4aa0-a635-c92895aac5d4http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/fa4d0f85-d286-4aa0-a635-c92895aac5d4edsyhttp://social.msdn.microsoft.com/Profile/en-US/?user=edsycannot connect to server in sql server management studioni successfully installed sql server 2008 express and management 2008 express. i can't connect to server, it's asking for a server name. how can i have that? i'm on a core2duo windows 7 setup. i tried using my computer name, it failed. i'm trying to learn sql on my own and this is supposed to be my first step. thanks!Thu, 26 Nov 2009 06:40:15 Z2009-11-26T22:19:24Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/b12150e1-2895-4aed-b825-6f3a9829a2a9http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/b12150e1-2895-4aed-b825-6f3a9829a2a9aryan_ismlhttp://social.msdn.microsoft.com/Profile/en-US/?user=aryan_ismlConnection is not open in visual studio 2008hi,<br/> <br/>   i create simple webform by using c# i create database by using sql server 2005.<br/>   i establish the connection by writing some string code and initialize the object<br/>   but when i run the webform i  get the msg the sqlserver connection is fail to open.<br/>   I need help plz.....<br/>   i m  using sql server management studio 2005 through<strong> windows authentication.</strong> <br/>   <strong>error msg : serverxyz login to fail the connection is not open.</strong> <br/>Wed, 25 Nov 2009 07:58:47 Z2009-11-26T21:35:40Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/104bd68a-c976-4a40-aa56-505ad1f4a7c9http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/104bd68a-c976-4a40-aa56-505ad1f4a7c9Maf Fereydounihttp://social.msdn.microsoft.com/Profile/en-US/?user=Maf%20FereydouniGuys who can help me with regard to this?Hello guys, i'm storing a set of records in my table in database using sqlserver. and i retrieve them in my front end application using C# now this is how i retrieve my records form database. <div><br/></div> <div>I have a list view with more than 20 columns. the problem i have is one of my column is named Birthdate and the way birthdate is being inserted in the table is used by 3 combobox. meaning so when i INSERT COMMAND for database when it comes to birthdate it gets the selectedItem of 3 combobox following cbo.Month, cbo.Days, cboYear. so i get each selectedItem of it. the problem is while i wanna populate them from database into listview. lets say for instance im using subitem[4].text for my edit. since the format of my birthdate column in database is mm/dd/yyyy for example february 21 1989 is 2/21/1989 this is how my birthdate fields are stored in my database i dont know how to separate the month day and year from the column because i wanna retrieve them as</div> <div> cbo.Month.SelectedItem = &quot;2&quot; cbo.Day.SelectedItem = &quot;21&quot; cbo.Year.SelectedItem = &quot;1989&quot; how can i have it this way, </div> <div>knowing the fact that my comboboxes already contain the years complete month and 31 days in it's item and they are all formed in number format. it just so happens that when it goes to database using INSERT COMMAND it will be like VALUES(&quot;' + cboMonth.SelectedItem.ToString() + &quot;/&quot; + cboDay.SelectedItem.ToString() + &quot;/&quot; + cboYear.SelectedItem.ToString() + &quot;', '&quot; etc..... thats how my birthdate column is being filled now i am having problem for retrieving it while i wanna split them back into 3 parts. </div> <div>any concern will be appreciated .  </div> <div><br/></div> <div>Thank you</div> <div><br/></div> <div>-Maf</div>Thu, 26 Nov 2009 04:59:23 Z2009-11-28T01:24:53Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/e18925f2-9b0b-4d86-8218-9a930716c657http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/e18925f2-9b0b-4d86-8218-9a930716c657justicefishhttp://social.msdn.microsoft.com/Profile/en-US/?user=justicefishStrange problem, unable to insert single quote (already add in an extra single quote) for one particular tableI have a very strange problem, I can update the table with single quote, but I cannot insert single quote. It only happen for this particular table in the database. Is there any suggestion on what I should look at?<br/> <br/> I had already added in an extra single quote in my sql statement, something like this:<br/> <br/> insert into Table_1 VALUES ('hello''s world','xxx')Wed, 25 Nov 2009 10:11:28 Z2009-11-26T13:49:38Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/a9b7d156-db75-4b8d-8031-38dec8d911fdhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/a9b7d156-db75-4b8d-8031-38dec8d911fdMerlinJnrhttp://social.msdn.microsoft.com/Profile/en-US/?user=MerlinJnrHow to Create a Temp Table from a SP that creates a Matrix (Variable Columns) Is there any way that I can create a temp table based on the output of a Stored Procedure that could return various numbers of columns. I.e. I want to EXEC a SP into a #Table without declaring the columns of the #Table prior to execution?<br/><br/> <br/><br/><hr class="sig">MerlinJnrTue, 24 Nov 2009 09:57:09 Z2009-11-26T08:50:38Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/44e369fa-e1e0-4eba-ba8c-b40d1b646f57http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/44e369fa-e1e0-4eba-ba8c-b40d1b646f57bzy180http://social.msdn.microsoft.com/Profile/en-US/?user=bzy180Sample DatabasesI have sql server 2008 management studio installed at home. I have been unsuccessful installing the Adventure database. I think it may only work for sql server 2008 and not management studio. Could someone send me the link for sample databases that work with management studio. Thanks.Wed, 25 Nov 2009 00:10:14 Z2009-11-26T06:40:26Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/43e65975-2fac-4ea9-9067-8b03d8462ac1http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/43e65975-2fac-4ea9-9067-8b03d8462ac1JCDShttp://social.msdn.microsoft.com/Profile/en-US/?user=JCDSSQL server Import wizard issue - not able to import a FLAT filehello all,<br/><br/>I am just trying to import data into a table. The flat TXT file has only 2 columns:<br/><br/>time,filepath<br/>00:00,/All_V/DBEventLog/MIL_EventLog.txt<br/>00:00,/All_V/Dashboard/FCASfCounterData.cab<br/>00:00,/All_V/DBEventLog/CI_EventLog.txt<br/>00:01,/All_V/Counters/Counters_WA003_<br/>00:01,/All_V/Counters/Counters_SERV036_<br/>...<br/><br/>but the wizard is giving me the following errors:<br/><br/><span lang=EN> <p>Operation stopped...</p> <strong> <p>- Initializing Data Flow Task (Success)<br/>- Initializing Connections (Success)<br/>- Setting SQL Command (Success)<br/>- Setting Source Connection (Success)<br/>- Setting Destination Connection (Success)<br/>- Validating (Success)<br/>- Prepare for Execute (Success)<br/>- Pre-execute (Success)<br/><br/>Messages</p> <p>- Executing (Error)</p> <p>Messages</p> <p>Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED. Thread &quot;WorkThread0&quot; has exited with error code 0xC0047039. There may be error messages posted before this with more information on why the thread has exited.<br/>(SQL Server Import and Export Wizard)</p> </strong> <p>Information 0x402090dc: Data Flow Task: The processing of file &quot;C:\tools\FtpMonitor\ex091124.txt&quot; has started.<br/>(SQL Server Import and Export Wizard)</p> <strong></strong> <p>Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column &quot;filepath&quot; returned status value 4 and status text &quot;Text was truncated or one or more characters had no match in the target code page.&quot;.<br/>(SQL Server Import and Export Wizard)</p> <p>Error 0xc020902a: Data Flow Task: The &quot;output column &quot;filepath&quot; (14)&quot; failed because truncation occurred, and the truncation row disposition on &quot;output column &quot;filepath&quot; (14)&quot; specifies failure on truncation. A truncation error occurred on the specified object of the specified component.<br/>(SQL Server Import and Export Wizard)</p> <p>Error 0xc0202092: Data Flow Task: An error occurred while processing file &quot;C:\tools\FtpMonitor\ex091124.txt&quot; on data row 3.<br/>(SQL Server Import and Export Wizard)</p> <p>Error 0xc0047038: Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component &quot;Source - ex091124_txt&quot; (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.<br/>(SQL Server Import and Export Wizard)</p> <p>Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED. Thread &quot;SourceThread0&quot; has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited.<br/>(SQL Server Import and Export Wizard)</p> <p>Error 0xc0047039: Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED. Thread &quot;WorkThread0&quot; received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. There may be error messages posted before this with more information on why the thread was cancelled.<br/>(SQL Server Import and Export Wizard)</p> </span>Any ideas?<br/><br/>Thank you<br/><br/> <hr class=sig> JCDSThu, 26 Nov 2009 00:55:51 Z2009-11-26T02:46:05Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/576711b9-58e5-42b7-8799-9db70c2ae439http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/576711b9-58e5-42b7-8799-9db70c2ae439dbworldhttp://social.msdn.microsoft.com/Profile/en-US/?user=dbworldMS SQl Server 2005 Developer EditionDeos anyone know if there are any other limitations to using the SQL Server 2005 development edition apart from not being able to use it on a production environment. I would like to know if I will be able to access other remote SQL servers once I install the development edition on my local machine. Or will I be restricted to using only SQL server that is installed only on my machine?Tue, 24 Nov 2009 16:22:15 Z2009-11-25T16:56:16Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/8323721d-3427-4feb-b010-8ebab5cab714http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/8323721d-3427-4feb-b010-8ebab5cab714DavidVAhttp://social.msdn.microsoft.com/Profile/en-US/?user=DavidVAWhere is the Northwind Database?Hi, newbie here.&nbsp; I downloaded SQL Server Express and thought that the Northwind sample database comes with it but I was wrong (once again).&nbsp; I thought it would be easy to figure out where it is hiding but apparently everybody in the world knows how to do this but me so there isn't much information on how to get it.&nbsp; Can somebody show me the link where it is along with the installation instructions?<br /> <br /> Thank you so much.<br /> <br /> Dave<hr class="sig">A friend is one who sees through you and still enjoys the view. -- Wilma Askinas (1926- ) American AuthorMon, 12 Oct 2009 17:13:07 Z2009-11-25T15:24:02Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/ad0da1d3-accb-4786-bd44-56f7b9f93f9dhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/ad0da1d3-accb-4786-bd44-56f7b9f93f9droma_victahttp://social.msdn.microsoft.com/Profile/en-US/?user=roma_victaselect query problemhi all,<br/><br/>i have a select query please have a look<br/><br/> <pre>select distinct ID,Name,Address,[Home Tel],[Mobile tel],[work tel],Email,[Birth date],Rate,Notice,Created,Modified,[last cv],Deleted,[q comments],[last typed],Recruiter from [dbo].[vItrisRepository] where (name like 'samy%' OR name like 'samy%' OR name like 'samy%' OR name like 'samy%') <strong>AND skills = 'Middle East' AND skills = 'Resident Engineer'</strong></pre> See the last and part &quot; <strong>AND skills = 'Middle East' AND skills = 'Resident Engineer'</strong> &quot;<br/><br/>Which is not working<br/><br/><br/>now the second one <br/><br/><br/> <pre>select distinct ID,Name,Address,[Home Tel],[Mobile tel],[work tel],Email,[Birth date],Rate,Notice,Created,Modified,[last cv],Deleted,[q comments],[last typed],Recruiter from [dbo].[vItrisRepository] where (name like 'samy%' OR name like 'samy%' OR name like 'samy%' OR name like 'samy%') AND skills = 'Resident Engineer'</pre> see the part &quot; <strong>AND skills = 'Resident Engineer' &quot;<br/><br/><br/></strong>This is working fine but the first one is working.<br/><br/><br/>i am generating the query programatically according to the user selection <br/><br/>but i cant seems to figure out why its not comming at the first time <br/><br/>Thanks in advance<br/>Roma Tue, 24 Nov 2009 07:37:40 Z2009-11-25T13:01:04Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/2a2141de-e59c-4fbd-b965-b05a68a9ebfehttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/2a2141de-e59c-4fbd-b965-b05a68a9ebfePhlibbohttp://social.msdn.microsoft.com/Profile/en-US/?user=PhlibboAccess to MS SQL: Cascading deletes<p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial">I’m a little confused why nobody else has posted about this problem, but then again, I’m not that familiar with databases and it might just be my own stupidity that prevents my DB from working.</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial">I used the &quot;Microsoft SQL Server Migration Assistant 2005 for Access&quot; to convert our Access Database for MS SQL 2005. Most of the conversion went flawlessly but some cascading deletes where left behind in the process. Here is an excerpt from the MSDN documentary that pinpoints the problem:</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><span style=""> </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>Unlike Access, SQL Server does not permit circular referential integrity. [...] To circumvent this issue in SQL Server, you will need to remove the referential integrity constraints from the tables, and create a trigger on each table to perform the updates. For more information about using triggers, see Enforcing Business Rules with Triggers.</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial">It sounded like a dirty solution to me, but, anyway, I started to create triggers and put them to wherever cascading delete didn't work anymore. My triggers look like this:</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>CREATE TRIGGER tgr_del_child</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em><span style="">   </span>ON<span style="">  </span>tbl_Parent</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em><span style="">   </span>AFTER DELETE</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>AS </em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>BEGIN</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"><em> </em></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>DECLARE @delId Int</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>SELECT @delId = (SELECT parent_ID<span style="">  </span>FROM Deleted)</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"><em> </em></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em><span style=""> </span>SET NOCOUNT ON;</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"><em> </em></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>DELETE tbl_Child FROM tbl_Parent, tbl_Child<span style="">  </span>WHERE tbl_Child.child_FS_Parent = @delId</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"><em> </em></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>END</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial">So, I basicly look up the key of the deleted row in the Parent-Table. Then I delete every entry in the Child-Table in which this key appears as a foreign key. This works perfectly untill I delete more than one row in the Parent-Table. This line causes the crash:</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial"><em>SELECT @delId = (SELECT parent_ID<span style="">  </span>FROM Deleted)</em></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small"><span style="font-family:Arial">So, it's obvious to me why it doesn't work, i just don't know how to avoid it. Can I save a set of IDs instead of a single one? Or is there after all a better solution than triggers to regain my cascading deletes? Redesigning the database is not really an option at this point; we just need it up and running soon.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:small;font-family:Arial">Again, I’m not that familiar with databases. Thanks for your help!</span></p>Fri, 20 Nov 2009 10:07:30 Z2009-11-25T10:47:58Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/3d6288ca-9d08-4c6b-90d0-261cffdf8f60http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/3d6288ca-9d08-4c6b-90d0-261cffdf8f60spydaioshttp://social.msdn.microsoft.com/Profile/en-US/?user=spydaiosproblem executing scalar valued function in remote database's ViewI have my local DB say &quot;HD&quot; on my machine <br/> <br/> and remote server say &quot;RM-S/2005&quot; has DB &quot;R-DB&quot;,<br/> in R-DB there is scalar valued function &quot;Function1(EmpId)&quot;<br/> <br/> In my local DB i need to create a view using Function1(Empid)<br/> <br/> view is say , &quot;view_ProjAccToEmployee&quot;<br/> as follows,<br/> <pre>SELECT A.ProjectID, A.ProjectName, [RM-S/2005].[R-DB].dbo.Function1(B.EmployeeID) AS EmployeeId FROM [RM-S/2005].[R-DB].dbo.Project AS A INNER JOIN [RM-S/2005].[R-DB].dbo.Employee AS B ON A.ProjectID = B.ProjectID and B.IsActive=1 </pre> <br/> It gives me error as follows,<br/> Msg 207, Level 16, State 1, Procedure view_ProjAccToEmployee, <br/> Invalid column name 'RM-S/2005'.<br/> <br/> I have added RM-S/2005 to linked server. Can't figure out what is problem <br/> because for other things like tables in [RM-S/2005].[R-DB] it works fine.<br/> <br/> .<br/> <br/> <br/> <br/>Mon, 23 Nov 2009 12:54:45 Z2009-11-25T10:01:32Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4e53f00d-66fe-46b5-a45f-78c29eec8c76http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4e53f00d-66fe-46b5-a45f-78c29eec8c76Janos99http://social.msdn.microsoft.com/Profile/en-US/?user=Janos99MAX(SHIFT_END_DATE) problem <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">Hi All;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">I am trying to get the last end of shift made with the shift number I’m using sql 2000 server, <span style=""> </span>my sql query in query analyzer doesn’t want to work I’ve tried two queries but no luck help will be much appreciated. </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">(1rst)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">SELECT UNIT_ID,TRANSACTION_SHIFT_NUMBER,MAX(SHIFT_END_DATE)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">FROM SHIFT_DETAILS</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">WHERE UNIT_ID IN ('16250','16251','16253','16254','16255')</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">GROUP BY UNIT_ID</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">(2<sup>nd</sup>)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">SELECT SD.UNIT_ID,TRANSACTION_SHIFT_NUMBER, (SELECT MAX(SHIFT_END_DATE) </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">FROM SHIFT_DETAILS AS SD WHERE SD.UNIT_ID = SD.UNIT_ID) </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">AS SHIFT_END_DATE<span style="">  </span>FROM SHIFT_DETAILS AS SD </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:12pt;font-family:'Arial','sans-serif'">WHERE UNIT_ID IN ('16250','16251','16253','16254','16255')</span></p>Wed, 25 Nov 2009 09:21:50 Z2009-11-25T16:51:03Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/c9624c63-60bb-4088-9809-fdbf596c30edhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/c9624c63-60bb-4088-9809-fdbf596c30edN_SQLhttp://social.msdn.microsoft.com/Profile/en-US/?user=N_SQLQuery to calculate percentage<p>How can I calculate percentage in a query?<br/>I have data like (just an example),<br/>Table1(Sno, SName, SAddress, SRace,SItems)<br/>Race can have Muslim, Christian, Hindu, Jew etc, where as SItems will have the number of items they bought..<br/>Result that I want is:<br/>S.no SRace Count_of_SItems Percentage<br/>1 Hindu 5 25<br/>2 Muslim 5 25<br/>3 Christian 5 25<br/>4 Jew 5 25<br/><br/>The percentage is taken from the total count of SItems. <br/><br/>1. How can I calculate the percentage?<br/>2. How can i check the total number of records in a table, at a perticular date?</p><hr class="sig">Regards,<br/> N_SQL <br/><b><i> Unfortunate is he who cannot gain a few sincere friends during his life <br/>...and more unfortunate is the one who has gained them and then lost them (through his deeds).</b></i>Tue, 24 Nov 2009 08:14:51 Z2009-11-25T09:46:33Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/0e820def-468e-42ba-89a4-20ae2441ea32http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/0e820def-468e-42ba-89a4-20ae2441ea32DBANaiduhttp://social.msdn.microsoft.com/Profile/en-US/?user=DBANaiduSQL Server DBA TrainingHi All,<br/><br/>I am very much interested in getting into SQL DBA Job. I took some sort of training for 2 weeks. That is not good enough  for me. Could any one help me how I can gain more knowledge. What to read . Where to read etc.<br/><br/>I would appreciate your help in this matter.<br/><br/>Thanks,<br/>naiduTue, 24 Nov 2009 19:42:52 Z2009-11-26T05:08:17Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/fc9f59d5-33f4-46a3-872f-a6e6a1e15663http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/fc9f59d5-33f4-46a3-872f-a6e6a1e15663limssdhttp://social.msdn.microsoft.com/Profile/en-US/?user=limssdMCITP 2005 Still Worth ?Hi,<br/><br/>I've experienced SQL Server 2005 db admin for about 2 years and now I'm starting to work on implementation and db admin in SQL Server 2008.<br/><br/>Does anyone know when is the SQL Server 2005 certification expiring ?<br/><br/>If it's still worth, I'm considering taking MCITP 2005 plus an upgrade to MCITP 2008. 3 exams for 4 certs.<br/><br/><br/>What's your advice ?<br/><br/>TIA...Tue, 02 Jun 2009 07:22:21 Z2009-11-25T05:17:40Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/2004df0e-727f-4cd0-a76d-fa2e45d94009http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/2004df0e-727f-4cd0-a76d-fa2e45d94009DB Teamhttp://social.msdn.microsoft.com/Profile/en-US/?user=DB%20Teamefficient way to delete the duplicate records<p>Hi,<br/><br/>    I want to remove duplicate email records from 37 million table having duplicate emails among the other 36 columns.I have 3 queries for that , But Iam not getting which one is efficient.<br/>So please suggest me the efficient method from below 3 queries.<br/><br/>Thanks in advance..........<br/><br/>---------------------------------------------------------------------------------------------------------------<br/>--Inserting into new table using <strong>group by<br/></strong><br/>insert into [newtable]<br/>select * from [consumer]<br/>where id in(select max(id) from [consumer]<br/>                  group by email) <br/>---------------------------------------------------------------------------------------------------------------<br/>--Deleting directly from table using <strong>self join<br/></strong><br/>DELETE FROM [consumer]<br/>WHERE [RID] IN <br/>(<br/>SELECT a.[RID] <br/>FROM [consumer] a,[consumer] b<br/>WHERE a.[RID]!= b.[RID]<br/>    and a.[RID]&lt; b.[RID]<br/>    and a.[Email]= b.[Email]<br/>)</p> <p>----------------------------------------------------------------------------------------------------------------------<br/>--Inserting into new table using <strong>Partition by</strong><br/><br/>with EmailRecords as (<br/>select<br/>    row_number() over (partition by Emailaddress order by Id desc) as RowNumber <br/>    -- Assuming Highest Id is most recent<br/>    Id,<br/>    FirstName,<br/>    LastName[,...]<br/>from  [consumer]<br/>)<br/>insert into NewTable<br/>select  Id,FirstName[,...] -- Note, do not include RowNumber<br/>from EmailRecords<br/>where RowNumber = 1;</p> <p>/*<br/>After running this, you can drop the original table then rename [NewTable] to the original table name.<br/>*/<br/><br/>---------------------------------------------------------------------------------------------------------------------------------</p>Tue, 24 Nov 2009 08:45:43 Z2009-11-25T04:05:19Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/7f5d9cfa-b5d2-4852-af08-be09f74cc4eehttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/7f5d9cfa-b5d2-4852-af08-be09f74cc4eeRoyal Oakhttp://social.msdn.microsoft.com/Profile/en-US/?user=Royal%20OakHow to retrieve a table from another databaseHi All,<br/> <br/> I have a question about retrieving a table from another database.  I've created a view called CS_View in db_1 which is as followed:<br/> <br/> create view [dbo].[CS_View] as<br/> SELECT source,<br/>         description<br/> from source<br/> <br/> How do I retrieve the source table from another database such as db_2.<br/> <br/> Thank you <br/> <br/> <br/> CC<hr class="sig">This person has no signature.Wed, 25 Nov 2009 01:48:09 Z2009-11-25T02:48:29Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/68e68370-567d-4316-88f7-a797a65f52cbhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/68e68370-567d-4316-88f7-a797a65f52cbrupertslandhttp://social.msdn.microsoft.com/Profile/en-US/?user=rupertslandHow do I store a file path as a hyperlink in a table?Hello.<br/><br/>In Microsoft Access I can store hyperlink paths to external documents.<br/><br/>In SQL Server 2005, I'm not able to find the equivalent. How does one store a file path as a hyperlink in a SQL Server database table? Does one just create a column and set the datatype to varchar(max) and store the file path as text, and have the front-end application read that path and open the file? Or is there (ok, this sounds too simple) a hyperlink on/off setting in SQL Server?<br/><br/>Tue, 24 Nov 2009 20:55:54 Z2009-11-25T02:27:33Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/241c44fd-30f2-4856-b04c-0f4d3ef7fba7http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/241c44fd-30f2-4856-b04c-0f4d3ef7fba7Chicago Bears 2009http://social.msdn.microsoft.com/Profile/en-US/?user=Chicago%20Bears%202009How to turn on MARS from MS Sql Server Management Studio?Same as title.Tue, 24 Nov 2009 21:23:59 Z2009-11-26T06:04:19Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/04d6ec37-98b5-4593-8ed0-0e7f23a8d8afhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/04d6ec37-98b5-4593-8ed0-0e7f23a8d8afrupertslandhttp://social.msdn.microsoft.com/Profile/en-US/?user=rupertslandPut all my eggs in one basket, or not?Hello.<br/><br/>I'm not sure if I should post my question to this form. If you have any suggestions for other forums, please let me know. Please accept my apology if my post is in the wrong place.<br/><br/>I am a biologist asked to implement SQL Server 2008 and build an environmental information system for a major client. I am also preparing for Microsoft certification in implementing and managing SQL Server, and want to progress to DBA. I feel pretty comfortable using SQL Server.<br/><br/>I've got a manager who is pressing to put all his &quot;eggs in one basket&quot;. In other words, migrate several different Microsoft Access databases with data from <em>multiple</em> clients into one single centralised database in SQL Server. This manager knows very little if anything about managing databases, and also likes to micromanage people! :-/<br/><br/>Putting one's eggs all into one basket may seem attractive to some, and there may be several advantages to doing so. However, I'm not convinced this is the approach to take, especially when data belonging to multiple clients end up all in the same system and need to be served out to those clients separately.<br/><br/>Does anyone have any arguments for (pros) the centralized (all in one basket) approach?<br/><br/>What are the dangers/cons of this approach?<br/><br/><br/>Sincerely,<br/>Rupertsland, Canada<br/><br/><br/><br/>Thu, 19 Nov 2009 17:14:20 Z2009-11-25T02:32:17Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/609cf8f0-6689-48df-a104-7a8c4bdca12bhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/609cf8f0-6689-48df-a104-7a8c4bdca12bVijayVZhttp://social.msdn.microsoft.com/Profile/en-US/?user=VijayVZSQL Svr Standard Edtn 2005 Win32 Sngl MVL 1 Proc purchase<p>I want ot purchase the <strong>SQL Server 2005 Standard Edition for XP</strong>. My sales team provide the purchase order having the sw name as <font face=Arial size=2><span style="font-size:10pt;font-family:Arial"><strong>SQL Svr Standard Edtn 2005 Win32 Sngl MVL 1 Proc</strong>. Is it correct ?</span></font></p>Fri, 10 Oct 2008 01:55:05 Z2009-11-24T16:30:44Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/86384e4f-4460-4759-bf9b-0d102f2934d6http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/86384e4f-4460-4759-bf9b-0d102f2934d6philsohttp://social.msdn.microsoft.com/Profile/en-US/?user=philsoCannot update "Securiry update for SQL server 2005 service park 2 (KB948109)Whenever I am updating my programs, the &quot;Security update for SQL server 2005 service park 2 (KB948109) always fails. That prevents me from viewing some installed downloaded programsTue, 24 Nov 2009 09:40:04 Z2009-11-25T09:55:06Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4d87da7e-06c6-4570-8ad7-4549de92685ahttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4d87da7e-06c6-4570-8ad7-4549de92685aPrzemek Zabludowskihttp://social.msdn.microsoft.com/Profile/en-US/?user=Przemek%20ZabludowskiChanging license key in SQL Server 2005 Standard Edition 64-bit<p align=left><font face=Arial size=2>Hi,</font></p> <p align=left> </p> <p align=left>I need to install Microsoft SQL Server 2005 Standard Edition 64-bit running on Windows Server 2003 R2 Standard Edition 64-bit. Instead of installing it on every single machine I thought of installing it on one of them, updating it with all the necessary updates, creating a ghost image of the updated system and database and copying the image on all the other machines.</p> <p align=left>After doing it I however need to update both the system and SQL Server license keys. And there comes my question whether one can change the SQL Server license key after the installation??</p> <p align=left> </p> <p align=left>Thanks in advance</p>Mon, 28 Apr 2008 14:00:00 Z2009-11-24T10:22:03Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/f574e97a-16a8-412f-878a-56a3f932fdd6http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/f574e97a-16a8-412f-878a-56a3f932fdd6mtm81http://social.msdn.microsoft.com/Profile/en-US/?user=mtm81if statement within a SELECT to change SUM totals?<p>I have a VERY simple SELECT statement which (amongst other things) gets a SUM from a total column in an orders table.<br/>I group it by a datepart Week so I get a total per week..<br/><br/>all works well.. <br/>however now I need to edit this so dependant upon the individual orderdate I divide the individual total by one of three numbers <br/>(I'm basically working with GROSS figures and need to re-work them back to NET, but here in the UK, the VAT rate will be changing soon as did again about 13 months ago..)<br/><br/>here is my existing Statement:<br/><span style="color:#808080;font-size:x-small"><span style="color:#808080;font-size:x-small"> <pre>SELECT SUM(Total) AS WeekRetailTotal, COUNT(*) AS MonthRetailOrderNo, DATEPART(wk, OrderDate) AS SalesWeek FROM dbo.Orders_Retail WHERE (account = @Account) AND (YEAR(OrderDate) = @YeartoUse) AND (OrderStatus &lt;&gt; 'Deleted') AND (PayStatus &lt;&gt; 'Pending') AND (OrderStatus &lt;&gt; 'Refunded') GROUP BY DATEPART(wk, OrderDate) </pre> <p><br/><br/>That sum total I need to change so that if the ORDERDATE field is before Dec 1st 2008 then I divide the total by 17.5,  between DEc 1st 2008 and Dec 31st 2009  divide by 15, and then after Dec 31st 2009, back to divide by 17.5<br/><br/>Any ideas how to do this?<br/><br/>thanks!! for any replies<br/><br/>Mtm81</p> </span></span></p>Mon, 23 Nov 2009 15:02:26 Z2009-11-24T10:12:08Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/42d43fa7-ad3b-4384-9bbd-2da3239ea459http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/42d43fa7-ad3b-4384-9bbd-2da3239ea459ARC_IThttp://social.msdn.microsoft.com/Profile/en-US/?user=ARC_ITSQL 2008 Downgrade Rights - ClarificationHi there, <br/><br/>I was just wondering if someone could explain to me how the SQL 2008 downgrade works.  I guess the specific questions I have are: <br/><br/><span style="font-size:10pt;font-family:'Arial','sans-serif'">1. Is there a cut off purchase date for SQL 2008 that includes downgrade rights?</span><br/>2. In the 2008 licensing overview it states:  <br/><br/>&quot;<span style="font-family:Arial">If you require SQL Server 2005 for existing solutions, you can still acquire additional licenses by taking advantage of the SQL Server 2008 &quot;downgrade rights.&quot; The downgrade rights enable you to purchase server plus device CALs, server plus user CALs, or processor licenses for SQL Server 2008 and install and use the previous version for a <span style="font-size:small"><strong>reasonable</strong></span> period of time.&quot;</span>       <br/><br/><span style="font-size:x-small;font-family:Arial">What is considered a &quot;reasonable&quot; period of time?</span>Fri, 20 Nov 2009 18:57:20 Z2009-11-24T09:48:37Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/8d70c092-d450-4b17-ad8b-05e41a781c08http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/8d70c092-d450-4b17-ad8b-05e41a781c08Dave Herrmannhttp://social.msdn.microsoft.com/Profile/en-US/?user=Dave%20HerrmannQuestion on Table PartitioningWe have a database that is currently &gt; 25Gb and is getting too large. We have two tables that comprise most of the size and are looking into ways to archive off some of this data to another database thus allowing us to shrink the main database and make is smaller. Someone suggested we look into table partitioning to address this. However, from reading the SQL docs, it sounds like all partitions must be in the same database. If this is true, then partitioning a table won't really make the database any smaller. <br/><br/>Am I correct in assuming that table partitioning won't really make our data base any smaller?<br/><br/>Thank you for any suggestions.<br/><br/>-DaveFri, 20 Nov 2009 17:32:01 Z2009-11-24T17:54:10Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4c0d4061-b850-488b-935f-b20d315bee45http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4c0d4061-b850-488b-935f-b20d315bee45MSSQL 2005 LICENSE UPGRADATIONhttp://social.msdn.microsoft.com/Profile/en-US/?user=MSSQL%202005%20LICENSE%20UPGRADATIONMSSQL 2005 License Last two weeks back we have purchased one MSSQL 2008/2005 License through SHI VENDOR.<br/> <br/>We have MSSQL 2005 Software in place. when we installing the MSSQL 2005 we are not able to update the new license product key.<br/> <br/>The existing product key located in the time of  installation. We need to update the new license key in the MSSQL 2005.<br/> <br/>Kindly assist me for this license changes.Tue, 24 Nov 2009 07:08:24 Z2009-11-24T07:13:40Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4e487e77-314b-4c53-b2e1-e900f375dcf1http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/4e487e77-314b-4c53-b2e1-e900f375dcf1Jameel Monsoorhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jameel%20MonsoorSQL Developer QualificationsTo be a good SQL develpoer what are the things one should knowSun, 22 Nov 2009 07:56:44 Z2009-11-24T10:50:36Z