Viewing 15 posts - 121 through 135 (of 455 total)
Please check if the following thread helps
October 10, 2007 at 9:42 am
Why don't you trying restarting the SQL Server Service unless you are running some realtime production databases on the server.
October 10, 2007 at 9:26 am
You may want to create a temp table and dump the data into that table and delete the duplicate rows using a cursor and fetch the data and display it...
October 10, 2007 at 7:12 am
Sarvesh, I am sure you are using SQL Server 2000 as your database. The syntax is not supported in SQL Server 2000.
October 10, 2007 at 6:36 am
As is said and experienced, dynamic sql is not recommended, however for your question the dynamic sql can accomplish the task.
DECLARE @counter INT, @cost CHAR(6)
DECLARE @sql VARCHAR(2000) -- you can...
October 10, 2007 at 6:08 am
CREATE VIEW MyView
AS
SELECT ID,
AmtType AS Type,
Amt_1_desc AS [Amt Desc],
Amt_1 AS Amt
FROM
MyTable
UNION ALL
SELECT ID,
AmtType AS Type,
Amt_2_desc AS [Amt Desc],
Amt_2 AS Amt
FROM
MyTable
UNION ALL
SELECT ID,
AmtType AS Type,
Amt_3_desc AS [Amt Desc],
Amt_3 AS Amt
FROM
MyTable
GO
SELECT *...
March 7, 2007 at 11:44 pm
CREATE TABLE #Output (ID INT NOT NULL IDENTITY(1,1), NAME VARCHAR(50))
INSERT INTO #Output
SELECT Name FROM Table1
UNION ALL
SELECT Name FROM Table2
SELECT * FROM #Output
DROP TABLE #Output
March 7, 2007 at 5:05 am
Your question is little ambiguous, it would make it more clear if you could just post with some sample data as to how it is currently stored in the table...
March 7, 2007 at 4:57 am
Hi John, thanks for setting the things straight. It is as simple as what you said
SELECT
a.CompanyID,
a
.CompanyName
February 28, 2007 at 4:28 am
Write a UDF to fetch the count for each CompanyID and call it from your select query.
Thanks
February 27, 2007 at 8:51 am
After declarations section in the beginning of your procedure.
SET @ErrorTotal = ' '
and try....
Thanks
February 19, 2007 at 2:46 am
Check the output of this query
SELECT
DISTINCT A.CompanyName
FROM
dbo
.Leads L
INNER
February 16, 2007 at 4:05 am
Do you have a range of dates ? I mean is the above requirement for a specific period of dates.
If you know your startDate and EndDate
DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
DECLARE...
February 16, 2007 at 3:55 am
Viewing 15 posts - 121 through 135 (of 455 total)