Viewing 15 posts - 16 through 30 (of 32 total)
nailosuper (10/24/2008)
I have a table which has some null values in "name" and "surname" columns. I use a function ti uppercase the first letter. But as i...
October 24, 2008 at 3:13 am
Is there any sequential unique column that we can use for sorting? If none, can you insert one, an IDENTITY, preferably.
-- CK
October 24, 2008 at 12:33 am
That would mean your table have three different records with the same password. Depending on your requirement, you can setup USERNAME & PASSWORD as unique index keys.
-- CK
October 23, 2008 at 2:00 am
Lots of ways:
select * from yourtable
where RowNumber in (@YourSelectRowNumber,@YourSelectRowNumber+1)
select * from yourtable
where RowNumber = @YourSelectRowNumber or RowNumber = @YourSelectRowNumber + 1
select * from yourtable
where RowNumber >= @YourSelectRowNumber and RowNumber...
October 22, 2008 at 11:21 pm
October 22, 2008 at 11:13 pm
Each table have their own (usually) unique structure. INSERT command might be created specifically for each table. If you have other tables on your db, you might inadvertently INSERT a...
October 22, 2008 at 11:09 pm
Here you go:
set nocount on
declare @yourtable table (id int, ind varchar(3))
insert into @yourtable values (1, 'No')
insert into @yourtable values (2, 'No')
insert into @yourtable values (3, 'Yes')
insert into @yourtable values (4,...
October 22, 2008 at 8:08 pm
Link the two tables using JOINS to link the two tables using whatever key that relates them.
Happy Coding!
-- CK
October 22, 2008 at 12:07 am
October 21, 2008 at 11:50 pm
Try the following code. Just make sure there's a single comma that separate last name from fist and middle names
set nocount on
declare @tblName table (id int, names varchar(50))
insert into @tblName...
October 21, 2008 at 11:45 pm
Here are commands that you're going to need.
Use UPDATE() to check if the column you're monitoring is the one that was updated by the DML.
October 21, 2008 at 11:26 pm
I'm not sure what do you mean by "compare" but here's the core code that you can just modify to fit your needs:
set nocount on
declare @LoginTable table (UserID int, StartTime...
October 21, 2008 at 11:14 pm
I'll take a shot at it. This is just a sample code:
Run this code:
declare @mytable table (mystring varchar(1000))
insert into @mytable values( 'This is the first line ' + CHAR(13) +...
October 21, 2008 at 10:14 pm
If the output is fixed and you don't need to pass any parameter, consider VIEWS.
-- CK
October 16, 2008 at 4:06 am
Will this work?
select t.name, c.name
from sys.tables t
inner join YourTable1 y on y.YourColumnWithTableName = t.name
inner join sys.columns c on t.object_id = c.object_id
order by t.name
Happy coding!
-- CK
October 16, 2008 at 3:58 am
Viewing 15 posts - 16 through 30 (of 32 total)