what are the ansswers the below quetions...
Hiiii...........eevry one..Greetings.....Thes are my critical interview quetiosns...... i did not answer....1.once logshipping configured..how many tables are created in msdb..how can you find ? what...
View ArticleMultiple Read Performance
Ive have a real issue in trying to make a decision in which way to go.In essence the proc will bring back one row from multiple data sets over and over from the webserver. In terms of reads it could...
View ArticleTrigger code Error (db_email)
My trigger code gives to this error At least one of the following parameters must be specified. "@recipients, @copy_recipients, @blind_copy_recipients".My Code =CREATE TRIGGER TRG_GOREVALAN ON TBLGOREV...
View ArticleHow clustered index stored on disk ?
It was interview. I had a question - how clustered index stored.I answered - it is a binnary tree stored physically on the disk.If we have clustered index then rows will be sorted ascending by it...
View ArticleMicrosoft TechNet Wiki Guru - Winners for July!!
The results for July's TechNet Guru competition have been posted!http://blogs.technet.com/b/wikininjas/archive/2013/08/11/technet-guru-awards-july-2013.aspx Congratulations to all our new Gurus for...
View Articlehow to find multiple ID info
I am trying parsing multiple request and put them in a store procedure. For example, user put many user_id , how can I return all the data related at the same time ? Thanks
View ArticleXML query returning NULL values for the given query
Hi All,I have an XML field in the table like this and I am trying to read the values using the following query.But the query returns NULL across the records. Please let me know where I am going...
View ArticleWhen using NOT IN subquery results are corrupt when null value is present
I found this caution statement in help:Any null values returned by subquery or expression that are compared to test_expression using IN or NOT IN return UNKNOWN. Using null values in together with IN...
View ArticleParameter-driven ASC/DESC Sort?
Without dynamic SQL I want to achieve the following goal:DECLARE @SortDesc bit = 1; SELECT * FROM Sales.SalesOrderHeader ORDER BY SalesOrderID CASE WHEN @SortDesc = 1 THEN DESC ELSE ASC END; /* Msg...
View ArticleDelete all records in SQL Server Management Studio Table
Hello,I need to delete all the records in a table.I just built it and found errors in a lot of the data so am starting over.Is there a simple bit of SQL code that will delete everything?Thank you in...
View Articlesp_helptext 'inner procedure name getting split'
Hi, Create Proc Test ( @QstNumber varchar(2000), @ScreenID varchar(10), @LoanNbr varchar(30), @UserID int, @RoleID int, @intLiaQstStart int, @intLiaQstEnd int,...
View Articletsql problem - matching up date ranges
The problem that I have can be demonstrated by the 2 datasets below. The first dataset is our source data, the second data set is the desired result. We have 3 account numbers in our source data 1-3,...
View ArticleQuery Help
Hi Guys I need a query for expected output below. Thanks in Advance ID Name SUM QTY Val ROS 1 201305_10151_ROMA_ROMA 0 2 -2 1 2 201305_10151_ROMA_ROMA 0 2 -2 2 3 201305_10151_ROMA_ROMA 0 2 -2 3 4...
View Articlestoring array data into a table
i have the data like [{1,'mahesh'},{2,'suresh'},{3,'naresh'},{4,'satish'}]i want to store this data into sql table.how?please help
View Articledynamic pivot table, trouble with the quotes
Hello Naomi,In relation to the other dynamic pivot table thread I've got an other question.I would like to change the column names in the query. However I keep bumping into problems cause while the...
View ArticleUnion two rows
I have a query with two tables, union'd together to produce a single result - but cannot achieve this. I make both tables look the same; (same fields, order & datatypes) yet the results are two...
View ArticleNeed of Columns in the query
Hi,I have written the below queryselect type_payment,booked_by,sum(grand_total) GrandTotal from jp_lr group by type_payment,booked_by order by type_payment;The output looks like the below.Type_Payment...
View Articleresetting identity column value back to 1
Hi ,In my DWH dimension table, I am using "identity key" (with (1,1) value) for the CustomerKey column.Now I have this dimension loaded. But I did som delete operation on this dimension. So, now final...
View ArticleSQL: Only Rounded numbers shown, everything else: Useless
I'm currently having terrible Problems with SQL, I am trying to calculate certain values, similiar to the ex. below:SELECT Sum(OrdersAchieved)/ Sum(SaleOpportunities) as CalculatedValue FROM ( SELECT...
View ArticleHow to combine two columns and get a total for each?
Hi,I have the query below:SELECT pehCurHrs AS [Current Hours], pehOrgLvl1 AS [Org Level 1], pehOrgLvl2 AS [Org Level 2] FROM EmpPers JOIN pearhist ph ON ph.pehEEID = eepEEID where pehPerControl >...
View Article