Viewing 11 posts - 1 through 11 (of 11 total)
If yourcolumn is defined as char(4) then the following will work
update yourtable set yourcolumn =
case when isnumeric(yourcolumn) <> 0 then right(rtrim(stuff(yourcolumn,1,0,'000')),3) else right(rtrim(stuff(yourcolumn,1,0,'000')),4) end
Otherwise,if yourcolumn is defined as...
October 6, 2004 at 7:12 pm
Using a temporary table to 1. get the records with gap of 10 between them , then add the minimum value for any records not existing in the table.
declare @WithinValue...
June 2, 2004 at 1:35 am
Not sure how efficient this would be ... but hopefully better than a cursor...
CREATE TABLE [Test] (
[ID] [varchar] (5) NOT NULL ,
[N1] [integer] NOT NULL )
GO
Insert into Test (ID,N1) values(0006,5)
Insert...
June 1, 2004 at 10:24 pm
Check your column names in joins & order by clause
If this doesn't fix problem , then what is the syntax error, and what are the datatypes of each column?
SELECT C.CUSTOMER_NAME,...
May 31, 2004 at 10:05 pm
How would you recommend refactoring this solution ...It really depends on how the data is stored and what you’re expecting to retrieve. May 25, 2004 at 8:19 pm
CREATE PROCEDURE GetRangeTotal @FromDateEnt smalldatetime,@ToDateEnt smalldatetime
as
DECLARE @FromYear AS int
DECLARE @ToYear AS int
DECLARE @FromMonth AS int
DECLARE @ToMonth AS int
SET @FromYear = YEAR(@FromDateEnt)
SET @ToYear = YEAR(@ToDateEnt)
SET @FromMonth = MONTH(@FromDateEnt)
SET @ToMonth = MONTH(@ToDateEnt)
SELECT...
May 24, 2004 at 10:30 pm
You can save diagram to a pdf file.
Download a pdf printer driver (eg pdf995.exe). Then from EM diagram, select print and select your pdf printer.
May 24, 2004 at 7:33 pm
In SQL 2000, varchar will support a max of 8000 chars, nvarchar will support a max of 4000 chars, text supports up to 2gb of data (and, as you noticed in...
May 23, 2004 at 10:32 pm
declare @insertSql varchar(5000)
set @insertSql='Insert into RMCPL_MAIL_HD(RMCPL_DT,RMCPL_SUB,rmcpl_usr) values(' + '''12/12/2004'',' + '''llolove'',27)'
Alternatuvely, you should be able to create a function quotename()
see article for description, which would make code a more readable
May 20, 2004 at 1:36 am
In version 8 you can also use ServerProperty, I think it was also available in v7
select Serverproperty('Edition')
This will provide output eg: Desktop Engine
May 12, 2004 at 11:08 pm
Viewing 11 posts - 1 through 11 (of 11 total)