This is my table CREATE TABLE [dbo].[Testng]( [ID] [int] IDENTITY(1,1) NOT NULL, [EventOn] [datetime] NULL CONSTRAINT [DF03317E3F] DEFAULT...
Hi All, DECLARE @Lock TABLE(LogInID INT, UserName VARCHAR(50), IpAddress VARCHAR(50), LogInDate DATETIME)INSERT INTO @LockSELECT 10, 'rkbabu',...
Hi, DECLARE @CheckInTime AS TABLE(InTime DATETIME) INSERT INTO @CheckInTime SELECT '1900-01-01 11:50:00.000' UNION ALL SELECT '1900-01-01...
Hi all, I wants to get the PrimaryKey, ForeignKey, UniqueKey, IdentityKey column names. I tried with the below query. But it returns all the...
Hi all, What is the internal representation of all the datatypes. Thanks, Babu Kumaraasamy
Consider I am having a table ([DBO].[WBCustomer]) with IDENTITY column ID. Truncate table [DBO].[WBCustomer] DBCC CHECKIDENT ('[DBO].[WBCustomer]',...
Hi all, We are having 125 tables and more than 1800 sp in our database with 8 schema. Lots of Procedures are given with wrong data type and size....
How to convert the two case statement in to single case statement CASE WHEN @StartKMs <> VRL.EndKms...
create table TestTable (ID INT IDENTITY, StartKms NUMERIC(18,2), EndKms NUMERIC(18,2)) INSERT INTO TestTable(StartKms, EndKms ) SELECT 6, 8 UNION...
Hi all, This gives the Parameters, DataType and its Size used in the stored Procedure 'SP_Name' SELECT PARAMETER_NAME , DATA_TYPE...
<p>I am having table like this.<br></p><table x:str="" width="600" border="1" cellpadding="0" cellspacing="1" height="115"><col span="8" width="80">...
DECLARE @Sample table ( ID VARCHAR(50), [Month] VARCHAR(20), TotalHours VARCHAR(12), [Year] INTEGER ) INSERT @Sample SELECT 'WE04', 'March',...
Hi, Myrequirement is that if there is no record in Log Table for the BatchTable Join Condition Log.ID = Batch.ID AND Log.LogDT = Batch.BatchDT,Then...
The below query returns SELECT REPLACE( RIGHT( REPLICATE('0',5 - LEN(5)) + CONVERT(VARCHAR(18), RB.Batch), 5) + '.00', '.', ':') FROM...
Hi, My column data type is [VHRBatchHrsKm] numeric(18, 2) NULL If I gave 0 it should store it as 00.00 If I gave 1 it should store it as 01.00...
Hi, I am doing a project for tube map. Help me how to store the data of the map into my database. If any algorithm available let me know. I want...
Hi, DECLARE@Sample TABLE ( StationID INT, Value INT ) INSERT @Sample SELECT 1, 3 UNION ALL SELECT 1, 2 UNION ALL SELECT 1, 4 UNION ALL SELECT 1,...
Hi, This is my table structure. CREATE TABLE [dbo].[Line] ( [LineID] int IDENTITY(1, 1) NOT NULL, [Line] varchar(100) COLLATE...
<p> Hi,<br><br>This is my table structure.<br><br>CREATE TABLE [dbo].[City] (<br> [CityID] int IDENTITY(1, 1) NOT NULL,<br> [City]...
Hi, Incorrect syntax near the keyword 'ASC'. Where to put the ASC and DESC. DECLARE @OrderBY CHAR(4) BEGIN SET @OrderBY = 'DESC'...
Separate names with a comma.