Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
30.03.2001, 19:53
|
|||
---|---|---|---|
Переход с SQL 6.5 на 7.0 |
|||
#18+
При переходе на SQL 7.0 почему-то перестали работать хранимые процедуры, т.е. обновление и добавление, идущее через них ошибок не вызывает, но и сохранять не сохраняет. Пример: CREATE PROCEDURE UpdateMessage @MessageNo Int Out, @CaseID Numeric, @Tag Int, @Date DateTime, @Man Varchar(255), @Message Text, @OnDate DateTime, @OffDate DateTime, @Staff Varchar(10), @Init Varchar (20) as if @CaseID <> Null if @MessageNo = Null Begin Select @MessageNo = isNull(Min(MessageNo) - 1,1) From Messages Where CaseID = @CaseID Insert Into Messages(MessageNo,CaseID,Tag,Date,Man,Message,OnDate,OffDate,Staff,Init) Values(@MessageNo,@CaseID,@Tag,@Date,@Man,@Message,@OnDate,@OffDate,@Staff,@Init) end Else Update Messages Set Tag = @Tag,Date = @Date,Man = @Man,Message = @Message, OnDate = @OnDate,OffDate = @OffDate,Staff = @Staff,Init = @Init Where MessageNo = @MessageNo and CaseID = @CaseID GO ... |
|||
:
Нравится:
Не нравится:
|
|||
|
30.03.2001, 20:46
|
|||
---|---|---|---|
Переход с SQL 6.5 на 7.0 |
|||
#18+
Может быть дело в этом "Care must be taken when comparing null values. The behavior of the comparison depends on the setting of the SET ANSI_NULLS option. When SET ANSI_NULLS is ON, a comparison in which one or more of the expressions is NULL does not yield either TRUE or FALSE; it yields UNKNOWN. This is because a value that is unknown cannot be compared logically against any other value. This occurs if either an expression is compared to the literal NULL, or if two expressions are compared and one of them evaluates to NULL. For example, this comparison always yields UNKNOWN when ANSI_NULLS is ON: ytd_sales > NULL This comparison also yields UNKNOWN any time the variable contains the value NULL: ytd_sales > @MyVariable NB!!!! ->>> Use the IS NULL or IS NOT NULL clauses to test for a NULL value. " ... |
|||
:
Нравится:
Не нравится:
|
|||
|
02.04.2001, 10:24
|
|||
---|---|---|---|
|
|||
Переход с SQL 6.5 на 7.0 |
|||
#18+
У меня было тоже самое. Заменил =/<> NULL на IS NULL / NOT IS NULL и все заработало. ... |
|||
:
Нравится:
Не нравится:
|
|||
|
|
start [/forum/topic.php?fid=46&tablet=1&tid=1827083]: |
0ms |
get settings: |
8ms |
get forum list: |
13ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
28ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
43ms |
get tp. blocked users: |
2ms |
others: | 25ms |
total: | 138ms |
0 / 0 |