eroorr
Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "OraOLEDB.Oracle" for linked server "prod". The provider supports the interface, but returns a failure code when it is used.
View Articlelinked server error
When I run below query its giving error: SELECT * FROM [P3FI.WORLD]..[ADHOC].[V_POSITION_FW] Msg 7356, Level 16, State 1, Line 1 The OLE DB provider "OraOLEDB.Oracle" for linked server "P3FI.WORLD"...
View ArticleHi Shanky , pls help out regading Profiler Trace issue ?
Hi Shanky, Pls help out . Regadng Profiler Trace . Thanks Vijay
View ArticleWHat is the best index type for non uniqueness / Varchar columns in SQL 2008 R2
Hello All Greetings,Please help me here with my doubt,in my table i have two columns about a million rows, it has about 20 columns in it, three columns with name as Period, Gender so most of the time...
View ArticleGet several group by results from one query result
Is it possible to to retrieve several group by results from one query? Currently I've a freetext book-title search system which returns the top X rows: First it queries the book-titles SELECT TOP 16...
View Articlehow to add spaces to the column value to make it up specifi length string please
Hello There,Could you please guide me here to solve this issue,in my column (named as State) contains values as belowCaliforniaWashingtonUtahConnecticutMassachusetsin the output how can i add a spaces...
View ArticleTSQL Get Previous values for each group by
Dear Friends,I have a problem with my TSQL statment. I need to get previous value for each day and specific unit. Everything goes fine if I have always 2 unit in each day. But if same day has just one...
View Articlehow to calculate master/detail table discount as value
hiI have a master table columns like InvoiceID,InvoiceDate,Discount%,InvoiceTotal & detail table columns like ProductID,Qty,Price,Discount%,ExtendedPrice. Now I want to calculate both discount...
View Articlesys.dm_exec_query_stats.query_hash ?
How do you query sys.dm_exec_query_stats for a given query_hash?This doesn't work: SELECT [st].[text] SQLText, [qs].* FROM [SYS].[DM_EXEC_QUERY_STATS] AS [QS]CROSS APPLY [SYS].[DM_EXEC_SQL_TEXT]...
View ArticleSQL Server JOIN vs UNION
Hi SQL Server experts,Am seeking expertize on JOIN vis-à-vis UNION. What are the pros and cons? At what scenarios you go for JOIN and for UNION.Please help with example rather than redirecting to any...
View ArticleExtract Amount column into positive and negative amount columns
Hi there,I have this sqlselect distinct epstransactions.PatientID, sum(epstransactions.LedgerAmount) from epstransactions inner join EPSReferralKPIs on epstransactions.PatientID =...
View Articlecreate rows even if no inner join match
Hi,I have this sqlselect EPSReferralKPIs.dbPatID, EPSReferralKPIs.dbPatLastName, EPSReferralKPIs.dbAddDate, EPSReferralKPIs.LastName,EPSReferralKPIs.dbStaffLastName, SUM(epstransactions.LedgerAmount)as...
View ArticleJoining table to Master SQL Command
Hi,I have setup a Local Server Group with the intention of running the below SQL command to pull out the servers and databases in the Local Server Group:USE MasterSELECT CAST(@@SERVERNAME AS VARCHAR)...
View ArticleLink more than two SQL Servers
Hi,I have 5 SQL Servers called the following (all SQL 2008 Servers):Group_Production Group_Test Group_Development Other_Production Other_TestIn each of these servers there are around 20+ databases....
View ArticleHow do I implement a complex table constraint?
I have a table similar to the following:-CREATE TABLE [dbo].[child_table]( child_id [int] IDENTITY(1,1) NOT NULL, child_status [varchar](25) NULL, parent_id [int] NOT NULL, CONSTRAINT [PK__child_table]...
View ArticleSELECT on year month only in '2013-Jan' format?
Hi,is there a way of selecting on year month only in sql when the format of the date passed is '2013-Jan'. I'm not sure at the moment if I have any control of the date format passed so wanted to...
View Articlecan we force sql server for row level locking
I am exporting many files with huge amount of data. I am trying to parallel process these files. I am using row level locking but as I researched even though I use row level locking the the no of rows...
View Articlequery performance to increase
hi i'm using cte's as defined and took a temp table to take the columns from temp table.now,when i'm executing this logic of sp..its taking 7min for 3lakhs records. can any one pls help me how to...
View Articletunning simple query with full-text
I would like tuning my query with full-text searching. I have two tables: 1. artaolInventTable a) IT_NAMEIDIDX (Unique, Non-clustered) - itemId - itemName (include column b) IT_IMPORTIDX...
View Article