Viewing 4 posts - 1 through 4 (of 4 total)
Declare @ColumnList nvarchar(4000)
SELECT @ColumnList = ISNULL(@ColumnList + ',', '') + Column_Name+char(13)
FROM INFORMATION_SCHEMA.Columns
WHERE Table_Name = 'tablename'
ORDER BY Ordinal_Position
print @ColumnList
Add a char(13) if you want a carriage return...
October 10, 2006 at 3:02 pm
This works, and is very straightforward:
declare @var as varchar(100)
set @var = '12312ASD435ASDah4ddASD123123'
if (isnumeric(@var)=0) --isnumeric return '0' false
print 'yes'
else
print 'no'
K.I.S.S Principle
June 17, 2005 at 12:34 pm
Joejoe,
Try this statement if the values are in one column:
update YOURTABLE
set YOURCOLUMN='0'+YOURCOLUMN
or you can use this is you need to zeroes based upon the data
update YOURTABLE
set YOURCOLUMN=
case
when len(YOURCOLUMN)=?...
October 6, 2004 at 3:35 pm
Before posting this, let me first disclose that of course there are better design methods...there is more than one way to skin a cat. However, in the "real world" sometimes...
October 5, 2004 at 4:05 pm
Viewing 4 posts - 1 through 4 (of 4 total)