CHECK CONSTRAINT question
In some Microsoft SQL Server scripts you sometimes see something like this: ALTER TABLE Table1 WITH CHECK ADD CONSTRAINT FK_Table2_Table1 FOREIGN KEY (COL2) REFERENCES Table2 (COL2); ALTER...
View ArticleDeleting SQL data failed due to constraint conflict
I have a procedure trying to delete data but it sometimes fails due to a foreign key constraint conflict.However, if it is run several times it successfully executes without any change in data or...
View ArticleMIN MAX Question
I need to find the MIN/MAX or values of type "REAL" in a database with lots of tables.I was able to find the names of all the columns(fields) that were of type "REAL" using a stored procedure.1. How to...
View Articleconnection problem
I downloaded file SQLEXPRADV_x86_ENU.exe (version 10.00.1600.22), and used it to install SQL Server 2008 Express with Advanced Services, which I think has capabilities comparable to SQL Server 2008...
View ArticleHow to upgrade express edition to Standard/professional edition
Hi,I have installed express edition of Sql Server 2008 R2. It's limited to 10GB of single database. My production db size is 17.5 GB. So i could not restore it. I want to upgrade my edition. But dont...
View Articlereg : Error in Restoring file from PR to DR which is in Log Shipping
Error: The log backup file 'D:\LS_DR\Weavings_MSCRM\Weavings_MSCRM_20130528214501.trn' was verified but could not be applied to secondary database...
View ArticleSQLSERVERAGENT: OpenCluster (reason: 5).
Hi,New SQL 2012 failover cluster. We get error during SQL failover.Event ID: 324 Source: SQLSERVERAGENT Message: OpenCluster (reason: 5).How can this be solved? thanks
View Articleamazon-enabled movi collection starter kit
i have installed amazon-enabled web site. it comes with a file dvdcollectiondatabase.mdf... i have sql server 2008. i m unable to attach this file with sql server 2008. any possibility to use this mdf...
View ArticleHow to configure TableAdapters with StoredProcedures ?
Hi as u know, when u create a DataSet in DataSet designer, Visual Studio creates a TableAdapter for each table and configure CRUD commands with t-sql commands. i want to configure TableAdapters with...
View ArticleSQL Server 2008 Standard R2 Installation files.
Hi,I recently acquired a server with SQL Server 2008 R2 (Cloud Services- SoftLayer) to upgrade my current production machine (from sql 2005). Even though I asked them to install it with a named...
View ArticleNot quite a PK\FK relation but almost......
I have two tables:TableA with composite primary key (a1, a2)a1 a2-- ---1 a1 b1 c2 d3 eand Table B with PK (b1)b1 b21 x2 m3 yI want to insure that any...
View ArticleMultiple users select the same row
HI,How to avoid the multiple user select the particular row.
View ArticleHow to figure out how many tables are affected in database after inserting a...
Hi,use sql profiler how to figure out how many tables are affected in database after inserting a record.Because of i have enter the value in application so i want trace out how many table are affected...
View ArticleQuestions about querys
Hi guys!I've a boring problem over here...I need to give a query name but, this query have some group by and order by commands. I already tested to create a view, but... it's not possible to do a view...
View ArticleIronic issue ...
I am actually not a beginner with SQL Server - but I consider this a beginner's issue so here I am.I am on a job site that has SQL Server 2008 R2 installed on a Server.They do *not* have BIDS installed...
View Articlehow update works
Hi all,I want to understand how update will work under the following circumstance:table 1datastudentstudent id student namedepartment name1abcd12efgh2departmentdept...
View ArticleSchedule an SSIS package but not run on Sunday!!!
Hi,Am trying to schedule an ssis package for once a month is it possible to tell the scheduler, if it is a sunday then it should run next day?Thanks in Advance.
View ArticleTO get firstday of the Month!!
Hi, Am trying to give dynamic date to SP that would be first of every month. 5/01/2013 for this month can any one help me with the sql expression? i was trying with this but it is not applicable for...
View ArticleCalculating difference between two dates (in workdays)
Can I calculate difference in workdays between two dates in an easy way? Is there a built in function in SQL Server that’ll work?
View ArticleUDP to query the current DB
Hi, I'm refactoring my SQL into UDP. The problem is that I want to define the UDP in another DB, because it is a common task that can apply to a bunch of my DBs. The SQL works fine before refactoring...
View Article