Answer Questions
harryvidhya select based on repeated numbers
i have telephone numbers in my table and i want to select based on numbe of repeated numbers.. for example.. 39657777 39111132 36399991 The first has foue 7s, second has four 1s and the thrid has four 9s. For the consecutive digits & Gold category, you can do below: phone_number like '%' + @pattern + '%' where @pattern = '1111' or '2222' or '3333' or '4444' For the same number repeated four times & Silver category, you can do below: phone_number like '%' + @pattern + '%' -- where @pattern = '111' or '222' or '333' or 4 in ( len(phone_number) - len(replace(phone_number, '1', '')) , len(phone_number) - len(replace(phone_number, '2', '')) , len( ...Show All
netpicker9 update and delete
I need to update rows in database A from data in database B and delete from database B if a match is found but leave in databse B if no match found. Is there a way do do this with the OLe DB command You can certainly get the delta between two tables in SSIS. See http://www.sqlis.com/default.aspx 311 You could delete using the OLEDB command component, but it will be slow - it issues a command one row at a time. Better perhaps to use batch operations in T-SQL for this scenario. Donald ...Show All
Christie Myburgh problem with recursive cte query
I am running into 2 problems with this cte query. First off, it's not returning the results in the right order. What I mean is that, as you can see from the graph, the first row (tabid=4) should be followed by rows 3,4 and 5 but it's throwing in a row between. No matter how I try and order the results, it's not working as it should. The tabindex field is a user defined field as to what order the tabs should show up for the user so I have to order by that field at some point. ParentTabId TabId Title Link TabIndex 1 4 Personal Info /Employee/employeeAdmin.aspx 1 1 5 Employment Info /Employee/positionInfo.aspx 2 4 8 Dependents /Employee/dependents.aspx 3 4 169 Emergency Contacts /Employee/Contacts.aspx 2 4 170 Demographics /Emplo ...Show All
giftgirls Default Filegrowth
Can anyone comment as to why MS would have changed the default filegrowth for data files from 10% to 1MB in 2005 I just got unpleasantly surprised by that one. I cannot come up with a reason for this change other than maybe autogrowth of data files is deemed irrelevent with instant file initialization. Hello Jens - That was my first thought as well, but I think it is only partially true. If you create your database with SSMS, then yes changing model will help you. If, however, you use CREATE DATABASE, then the default will always be 1 MB. Therefore, as a DBA you must always be mindful of this change since the databases you support could be created in any number of ways (manually, install programs, con ...Show All
trej Stored Procedure Performance
Hello, Given that a stored procedure and T-SQL code in query analyzer are exactly the same, why would the stored procedure run much slower When I mean much slower I mean 3 sec for the code in query analyzer as opposed to 2:33 sec for the stored procedure. Exact same code! Profiler also gives more reads and writes for stored procedure, and a lot of BatchStarted and BatchCompleted directives between the 'start' and 'end' of the stored procedure. Any help is greatly appreciated. -Tim Did you update statistics and rebuild indexes after upgrading to SQL Server 2005 And did you flip the database over to 90 compatability mode I recommend doi ...Show All
Dual Cortex Deploying a report services application to the local host; error:A connection could not be made to the report server
I installed SQL reporting services 2005 and successfully configured reporting services.After designing the report using Bussiness Intelligence Studio, i tried to deploy my reporting services application to the localhost , I got the below mentioned error : TITLE: Microsoft Report Designer ------------------------------ A connection could not be made to the report server http://localhost/ReportServer . ------------------------------ ADDITIONAL INFORMATION: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. (Microsoft.ReportingServices.Designer) ------------------------------ The request failed with HTTP status 404: Not Found. (Microso ...Show All
AravindKumar What does it take to update a SQL Everywhere db?
[VS2005, SQL Everywhere in a VSTO Outlook addin, Typed Datasets] Is there some special flag I need to set in order to update a SQL Everywhere db table I am able to fetch the table via a typed dataset but when I try to update it (using the overload that passes in a row OR the overload that passes in column values as params) it executes successfully but never updates the the SQL Everywhere table. public void PullData() { RemoteTableSyncTableAdapter adapterRemoteSync = new RemoteTableSyncTableAdapter(); RemoteTableSyncDataTable dtSync = adapterRemoteSync.GetData(); foreach (RemoteTableSyncRow row in dtSync.Rows) { row.LastPullDateTime = DateTime.Now; row.LastPullFailed = true; try { ...<some RDA code her ...Show All
KAAU Full-Text Crawl Error in logs
Hello I get tons of errors of this type. Are the error-code (x14b) documented I've checked a couple of rows but don't find what could be wrong. I'm running sql 2005 with sp1, noise-word files are empty, index has many columns which are in different languages. Thanks for any support Extract from log 2006-12-20 22:52:51.53 spid20s Error '0xc000014b' occurred during full-text index population for table or indexed view '[shab001].[dbo].[TSH_SHABDATA]' (table or indexed view ID '917578307', database ID '5'), full-text key value 0x00000000001E7E42. Attempt will be made to reindex it. 2006-12-20 22:52:51.53 spid20s The component 'MSFTE.DLL' reported error while indexing. Component path 'C:\Programme\Microsoft SQL Server\MS ...Show All
codingonthescreen ReportService2005.asmx
Does anyone know of any good documentation for using the Reporting Services Web Service I am having difficulty figuring out a few things, even with Google. pjp thanks See SetDataSourceContents() http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005.setdatasourcecontents.aspx hi all, I've been trying to create a subscription thru ReportService2005.asmx and it requires the the credentials for the datasource to be used should be stored on the report server, is there a way of doing this thru ReportService2005.asmx Thanks, Allan ...Show All
donRiccardo Insert Date/Time Question...
Hello, I have an access database that contans a field called 'My_Date'. Since I want the column to store the date and time, I made the datatype of the the column 'Date/Time'. When I just insert the date like this: Insert Into Meeting (My_Date) Values ('01/01/01') The default time of '12:00:00AM' is given. So when i query the field I get the following output: 01/01/01 12:00:00AM How can i make it so when i insert a date and no time, there is no default value of 12:00:00AM So when i query i will just get: 01/01/01 Thanks, Another way to handle this is add another field to the table called DateMode where: 1 = Display date only, 2=display time only, 3 = display both date and time ...Show All
Uma P is SSIS wonderful?
Hi guys, I'm using sql 2000 now but eventually will upgrade existing server to sql 2005. currently we only have OLTP dbs. I would like to set up data warehouse & OLAP functionality to drive reporting from the system, is SSIS the product I need can you please give me the suggestions regards NewWorld wrote: I know SQL 2005 can do pivot() in the query, isn't enough for reporting Do I really need to use SSIS Reporting really has nothing to do with SSIS. Though you can perform upfront calculations in SSIS and load them into a table to be later used for reports. Pivot Pivot is only a small piece of SSIS. SSIS will certainly help you get your data w ...Show All
Liam404 SQL 2000 to SQL 2005.
Hi, Could anyone provide me with good resources for SQL 2000 to SQL 2005. ( Migration best practices / Migration implementation plans, guidelines ) Thanks & Regards. DBAnalyst. Hi, Refer below links http://www.microsoft.com/technet/interopmigration/prodtech/migrate/sql/default.mspx http://www.microsoft.com/sql/solutions/migration/oracle/ssma_faq.mspx http://www.microsoft.com/technet/community/events/sql2005/sql-10.mspx Also refer http://vyaskn.tripod.com/moving_sql_server.htm Hemantgiri S. Goswami Thanks Hemantgiri. ...Show All
Minherz Can't uninstall or reinstall SQL Server 2005 Dev
Long story short: Installed SQL Server 2005 Developers Edition along with Visual Studio 2005. Everything worked as it should. Then there was a problem installing .NET Framework 2.0 Security Update. Fixed that by uninstall and reinstall of .NET Framework 2.0. Now SQL Server does not work. So I figured uninstall/reinstall. Only problem is that it WILL NOT uninstall. I have tried to uninstall manually per KB article (9009967). That doesn't work either. The error info that I'm geting is: LinkID: 20476 Product Name: Microsoft SQL Server Product Version: 9.00.2047.00 Message source: setup.rll Message ID: 50000 EvtType: stateengine\resourcemodule.cpp@ScheduleActionAction@sqls::ResourceModule::LoadStringW@0x716 I ...Show All
Rasmus Helwigh "Intellisense"......
According to the link: http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx under Programmability Features, Transact-SQL IntelliSense is supported for Sql 2005 Workgroup edition on up. I have never seen Intellisense in the Query Editor. Can anyone comment on what the URl is referring to TIA, Barkingdog Moving to the Tools thread... if they can't answer, perhaps the Engine folks can. ...Show All
Sajitha Jose Nullable Foreign Keys
Hi, I'm making a system enhancement and have a database design Q. The database contains a transactionitem table with a foreign key relationship to a Product Table. I need to extend the database schema to show that the TransactionItem.Product may also relate to another type of product grouping (depends on the sale type and this will be solely for reporting). Note. I can't link back using the TransactionItem.ProductID as this could belong to more than one group. My Question really is "Is it Good practise to have foreign key column with null values". I estimate that 80% or transactionitem records would contain null for this colunm. If I use an intermediate table the relationship between my TransactionItem and my new (new) ...Show All
