Viewing 15 posts - 15,166 through 15,180 (of 15,381 total)
Derrick Smith (10/22/2010)
Actually you can use varchar(max), nvarchar(max), varbinary(max) with inserted/deleted tables. It's just the deprecated ones that don't work.
o rly? I didn't know that. I thought it would be...
October 22, 2010 at 1:01 pm
There are certainly ways to do this. In order for anyone to help you, you have to help us help you. Post table definitions, inserts with sample data. Then what...
October 22, 2010 at 12:57 pm
First thought is to ask if you really need this field as ntext. Can you use nvarchar instead. It is pretty big at 4,000 characters. If you specify it with...
October 22, 2010 at 12:51 pm
That looks like it should do the trick quite nicely. 🙂
October 21, 2010 at 9:18 am
I changed this up and made it so that it can easily handle a dynamic number of where conditions..
create procedure procedure1
(
@city varchar(20),
@department varchar(20),
@name varchar(20)
) as
begin
declare @sql varchar(500);
set @sql = 'select...
October 21, 2010 at 8:36 am
This whole thing just isn't going to work as it sits.
If city <> '' your query will be "select * from employees where where city = 'city'"
if city = ''...
October 21, 2010 at 8:10 am
What do yo mean by filter? Do you want to not allow the insert if it contains anything that might be html or sql? Do you want to remove the...
October 21, 2010 at 8:01 am
Looks like the "ON" is missing on the first join too. Basically you created an incredibly long alias for you table. 😉 Also, just guessing that once you get this...
October 21, 2010 at 7:54 am
By far the easiest and only truly consistent way is to use a datepicker control. You are wanting to allow manual input of dates in just about any format. Not...
October 21, 2010 at 7:10 am
You could make it do some checking and decide what to do with it.
create trigger myInsertTrigger
instead of insert on MyTable
as begin
if exists(select field from MyTable) then
...
October 20, 2010 at 2:47 pm
I was laughing because you said exactly what I was thinking. I was going to let it rot since like you I noticed it was the same as the other...
October 20, 2010 at 2:04 pm
LOL Lutz. 😀
October 20, 2010 at 1:38 pm
You should probably use an instead of trigger. If you do this after the insert...the record already exists because it was just inserted. Then inside your trigger you can decide...
October 20, 2010 at 12:15 pm
nithiyanandam-447806 (10/20/2010)
Now my client needs to the following format for date.
(for different end users in different states)
The following formats will insert...
October 20, 2010 at 7:30 am
Viewing 15 posts - 15,166 through 15,180 (of 15,381 total)