Viewing 15 posts - 361 through 375 (of 444 total)
As far as I underrstood ur problem, you are already doing the job.
I dont know why are you going for TOP 1/
Just run the two queries as;
-- To...
August 1, 2008 at 5:30 am
My Way to calculate...
DECLARE @dd AS DATETIME
SELECT @dd = Dateadd(YEAR,-10, getdate())
SELECT @dd
Select DATEDIFF(yy, @dd, GETDATE()) - CASE
WHEN DATEPART(m, @dd) > DATEPART(m, GETDATE())
THEN 1
When DATEPART(m, @dd) =...
August 1, 2008 at 1:11 am
The data in the Identity Column can be duplicated if it is Not a PK or the column is Not Uniquely Indexed. This can be checked by using
SET IDENTITY_INSERT...
July 31, 2008 at 5:54 am
R u having problem in data sort?
I think the default Collation is
SQL_Latin1_General_CP1_CI_AS
try query to check for your options...
SELECT Name, Description FROM fn_helpcollations()
WHERE name like 'L%'
SELECT Name, Description FROM...
July 31, 2008 at 4:27 am
Here You Go...
CREATE TABLE [dbo].[Tab2](
[c3] [int] NOT NULL,
[c4] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
Go
INSERT INTO Tab2
SELECT 1,'A' UNION ALL
SELECT 2,'B' UNION ALL
SELECT 2,'C' UNION ALL
SELECT 2,'A' UNION ALL
SELECT 3,'A' UNION...
July 31, 2008 at 4:21 am
Professional SQL Server 2005 Programming By Robert Vieira
Inside Microsoft SQL Server 2005: T-SQL Programming
byItzik Ben-Gan, Dejan SarkaandRoger Wolter
Microsoft Press 2006 (532 pages)
BOL, MSDN, and Alot more...
Atif Sheikh
July 31, 2008 at 3:57 am
I was looking for the reply of this post...
Nice tool found.
Thanks Markus Bohse
Atif Sheikh
July 31, 2008 at 3:51 am
Ofcourse I know that the return value can be set in the SP and it returned accordingly IF it is retunned using RETURN.
SP also returns a vlaue and that...
July 31, 2008 at 2:24 am
Dear Mrbaseball34...
Comming to your SP code for rr_Insert_ptEncounterDetail
CREATE PROCEDURE rr_Insert_ptEncounterDetail
@ptEncounterDetailID int
AS
BEGIN
INSERT INTO ptEncounter (EncounterDetailID) VALUES (@ptEncounterDetailID)
SELECT SCOPE_IDENTITY()
GO
If you are running the same code...
July 31, 2008 at 2:23 am
Sorry for the confusion due to my incomplete statement. Sp returns the return value when you Exclusively specify it. Otherwise it ALWAYS returns zero if executed successfully and retuirns an...
July 31, 2008 at 2:20 am
If the structure of the temp table remains the same for all the reports, and only the data is changed according to the criteria, then the INDEXED VIEW will be...
July 31, 2008 at 1:10 am
For SQL Server 2000:
http://www.microsoft.com/sql/prodinfo/previousversions/system-requirements.mspx
For SQL Server 2005:
http://www.microsoft.com/sql/prodinfo/sysreqs/default.mspx
Atif Sheikh
July 30, 2008 at 5:29 am
But the best is that you should create a script file, as suggested above for the tables that you want on the new machine.
Atif Sheikh
July 30, 2008 at 5:23 am
As far as I understood your question, you are trying to create some tables through your VB application at runtime. For example on Clicking the commandbutton1, Table1 created on the...
July 30, 2008 at 5:22 am
CREATE TABLE Test(Col int DEFAULT 0)
INSERT INTO test
SELECT TOP 10 0 AS N
FROM Master.dbo.SysColumns
You can change number of records in TOP and Default value as you like and...
July 30, 2008 at 3:52 am
Viewing 15 posts - 361 through 375 (of 444 total)