Viewing 15 posts - 1,861 through 1,875 (of 1,922 total)
rahul.koduru (4/5/2010)
But, the example I provided is really a short version of what I really need.In the actual problem,
thats the turning point, please be specific with what your requirement...
April 5, 2010 at 8:51 pm
Thanks Lynn for checking that out!! i was kind of reluctant to post it without testing.. now that u tested and decorated the code, the OP can directly us that.....
April 5, 2010 at 8:46 pm
hi there, here is the code u asked for.. check the output of this from that print statement.. if that matches your requirement, uncomment the exec part and your requirement...
April 5, 2010 at 8:41 pm
I understood partially your requirement and here is the code for that
SELECT
CASE LOOKUP.COL1
...
April 5, 2010 at 8:25 pm
Jeff Moden (4/5/2010)
That will work for only 1 level of approval.
Jeff i did not have the time to execute the query, my bad :doze:.. but the solution using the recursive...
April 5, 2010 at 7:48 pm
the solution i have provided is created by me closely following the recursive-cte explanation give in BOL 2008 (http://msdn.microsoft.com/en-us/library/ms186243.aspx).. excellent article with the example walk-thro.. u ll find it very...
April 5, 2010 at 3:50 am
What you have in hand is a classic "running total" statement..
i suggest you go thro the following excellent article by Jeff Moden to get the gist and solutions of...
April 5, 2010 at 3:00 am
This will also give u the result u wanted..
SELECT
EH.EmpID AS EmpID,
EH1.EmpName AS EmpName ,
EH.EmpName EmpApproverName
...
April 5, 2010 at 2:56 am
Please inform here if that code fixed your issue 🙂
April 5, 2010 at 2:49 am
You can acheive with a recursive CTE....
Here is a good example:
if object_id('Emp_Hierarchy') is not null
drop table Emp_Hierarchy
Create table Emp_Hierarchy
(
EmpId int identity(1,1) not null constraint pk_EmpId Primary key,
EmpName varchar(128) not...
April 5, 2010 at 2:45 am
The best place is the forums in this very website.. if u need real time examples/problems on a topic, say "inner joins" as you mentioned, just go up to the...
April 4, 2010 at 11:28 pm
Buddy, thats a huge requirement.
1. Find out the who are FKs
2. Check for the Cascade rule.
3. Create a script to compare table in this relationship
4. Create a set-based code to...
April 4, 2010 at 10:49 pm
Buddy, here is the code u had requested.. It will loop thro the PubName CTE and execute sp_helpArticle for each PublicationName without WHILE Loop. Please note that i have commented...
April 4, 2010 at 10:29 pm
Tara, from your expected result set, i see u want the minimum date for the combination of size and DB name..
(if the above statement is right, then can u pls...
April 3, 2010 at 10:53 pm
David, as in Gail's reply, please go thro that article which Gail wrote about the SQL-Injection probelms with dynamic sql and how to counter them.. excellent article that.. and take...
April 1, 2010 at 4:26 am
Viewing 15 posts - 1,861 through 1,875 (of 1,922 total)