Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.09.05;
Скачать: CL | DM;

Вниз

MS dbase driver   Найти похожие ветки 

 
BJValentine ©   (2002-08-14 19:48) [0]

Может кто знает как в условии where можно задать дату в критерие. Пишу так:

insert into SqlBace(field1, datafield)
select field2, datafield2 from OpenRowset("MSDASQL.1", "Driver={Microsoft dbase Driver (*.dbf)};DBQ=c:\base;", "select field2, datafield2 from DbfBase where datafield2=""01.01.2002""")

-не катит. И вообще, где про это можно прочитать? Заранее благодарен.


 
sniknik ©   (2002-08-15 10:43) [1]

форматы
ODBC timestamp escape sequences are of the format:
{ literal_type "constant_value" }
literal_type
Specifies the type of the escape sequence. Timestamps have three literal_type specifiers:
d = date only
t = time only
ts = timestamp (time + date)
"constant_value"

примеры
These are examples of ODBC time and date constants:
{ ts "1998-05-02 01:23:56.123" }
{ d "1990-10-29" }
{ t "13:33:41" }

в твоем случае
insert into SqlBace(field1, datafield)
select field2, datafield2 from OpenRowset("MSDASQL.1", "Driver={Microsoft dbase Driver (*.dbf)};DBQ=c:\base;", "select field2, datafield2 from DbfBase where datafield2={ d ""2002-01-01"" }")

читай хелп почаще. в частности SQL Server Books Online раз MSSQL-лем занимаешся.


 
BJValentine ©   (2002-08-15 13:45) [2]

Спасибо, выручил. Нашел в хелпе про это. Буду дерзать.



Страницы: 1 вся ветка

Текущий архив: 2002.09.05;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.028 c
14-14267
BAY
2002-08-08 22:08
2002.09.05
freebsd


3-13871
NDR
2002-08-12 13:07
2002.09.05
УЖАВАЕМЫЕ МАСТЕРА! Как выйти из цикла?!


1-14136
-=Владимир=-
2002-08-24 13:25
2002.09.05
Рабочий стол.


3-13977
Димон1
2002-08-16 12:39
2002.09.05
В mssql вставить в поле типа image данные из другой строки


7-14297
ACE
2002-06-24 21:31
2002.09.05
Серийный номер винта