Viewing 15 posts - 1 through 15 (of 17 total)
You can make use of WHILE[/url] loop or Recursive Queries Using Common Table Expressions
April 25, 2012 at 3:07 am
I think the second solution I posted (with small script) will do the job.
April 25, 2012 at 1:25 am
@Phil:
I added WHERE clause in the script mentioned in the first link of my post. After adding the WHERE clause, it looks like this:
SELECT
t.NAME AS...
April 25, 2012 at 1:23 am
OK Guys.
This code returns all tables and total rows in each table. I also used WHERE clause:
CREATE TABLE #temp
(
...
April 25, 2012 at 1:11 am
The links below may help. You can add a WHERE clause to meet your requirements for the number of rows.
April 25, 2012 at 12:34 am
A trigger is similar to stored procedures with a little difference. Trigger is attached to a table and the code gets executed automatically when row is inserted, updated or deleted...
April 23, 2012 at 3:54 am
You provided very little information. What exactly you want to do?
April 23, 2012 at 2:30 am
Create an AFTER INSERT trigger and add that query into it.
April 23, 2012 at 2:07 am
Refer to these article:
Using SQL Server 2005/2008 Pivot on Unknown Number of Columns (Dynamic Pivot)[/url]
SQL Server Pivot: Converting Rows to Columns with Dynamic Query
April 23, 2012 at 2:02 am
Refer to this links:
April 23, 2012 at 12:42 am
@data Analyst:
Provide us more details. If you take time to craft your question well, you have more chances of correct answer.
What is the structure of the two tables...
April 22, 2012 at 10:56 pm
Each forum has its own plus and minus. Stack Overflow is not dedicated to SQL Server but a common platform to ask any type of questions.
Any forum answer is not...
April 21, 2012 at 4:36 am
The person asking the question will come to know whether the answer is correct or not by trying out and seeing the output. This is applicable to forums where the...
April 21, 2012 at 4:01 am
Probably something like this:
DECLARE @Query1 Varchar(1000)
DECLARE @Query2 Varchar(1000)
DECLARE @FinalQuery Varchar(max)
SET @Query1 = 'SELECT * FROM Employees A'
SET @Query2 = 'SELECT EmpDept, EmpID FROM EmpDepartments'
SET @FinalQuery = @Query1 + ' LEFT...
April 19, 2012 at 11:30 am
Viewing 15 posts - 1 through 15 (of 17 total)