#0
by vbh
можно ли исполнить sql запрос из файла, например "c:zapros.sql" т.е. не использовать а что-нибудь типа задача исполнить запрос из файла c:zapros.sql и загрузить его в ТЗ
#5
by vbh
AI.ANAME AS ADVCOMMENT, AI.POSTDISPACH, (select t.SFNUM from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCNUM, (select t.tdate from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCDATE from Accounts A, Accountsinfo AI, Servicetypes ST, (select distinct S.ID,S.SRVTYPEID from services S) S,(select '' AS "UNAME",1 AS "SRVTYPEID" from dual /*union select '????. ?????: ',-1 from dual*/) SS where A.ID=AI.ID AND S.ID=A.ID AND AI.ANAME AS ADVCOMMENT, AI.CONTRACTNUM, P.SUMM as SUMM, AI.SFNEED, P.QUANTITY as AMOUTH, AI.POSTDISPACH, (select t.SFNUM from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCNUM, (select t.tdate from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCDATE from Accounts A, Accountsinfo AI, Servicetypes ST, services SS, payments P --(select distinct S.ID,S.SRVTYPEID from ) S,(/*select '' AS "UNAME",1 AS "SRVTYPEID" from dual union*/ select '????. ?????: ' AS "UNAME",-1 AS "SRVTYPEID" from dual) SS where AND P.PDATE between :SD AND :ED)
#9
by vbh
AI.ANAME AS ADVCOMMENT, AI.POSTDISPACH, (select t.SFNUM from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCNUM, (select t.tdate from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCDATE from Accounts A, Accountsinfo AI, Servicetypes ST, (select distinct S.ID,S.SRVTYPEID from services S) S,(select '' AS "UNAME",1 AS "SRVTYPEID" from dual /*union select 'Абон. плата: ',-1 from dual*/) SS where A.ID=AI.ID AND S.ID=A.ID AND AI.ANAME AS ADVCOMMENT, AI.CONTRACTNUM, P.SUMM as SUMM, AI.SFNEED, P.QUANTITY as AMOUTH, AI.POSTDISPACH, (select t.SFNUM from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCNUM, (select t.tdate from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCDATE from Accounts A, Accountsinfo AI, Servicetypes ST, services SS, payments P --(select distinct S.ID,S.SRVTYPEID from ) S,(/*select '' AS "UNAME",1 AS "SRVTYPEID" from dual union*/ select 'Абон. плата: ' AS "UNAME",-1 AS "SRVTYPEID" from dual) SS where AND P.PDATE between :SD AND :ED)
#11
by vbh
согласен для 1с-ки они не приемлимы, но оракл их глотает на ура. Сейчас попробую без кавычек
#12
by vbh
не помогло, 1с-ка по-прежнему вылетает запрос без кавычек SELECT * from (select SS.SRVTYPEID*ST.SRVTYPEID AS SRVTYPEID, SS.UNAME||ST.UNAME AS UNAME, A.ID, AI.ANAME AS ADVCOMMENT, AI.POSTDISPACH, (select t.SFNUM from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCNUM, (select t.tdate from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCDATE from Accounts A, Accountsinfo AI, Servicetypes ST, (select distinct S.ID,S.SRVTYPEID from services S) S,(select '' AS UNAME,1 AS SRVTYPEID from dual /*union select 'Абон. плата: ',-1 from dual*/) SS where A.ID=AI.ID AND S.ID=A.ID AND select -1*ST.SRVTYPEID AS SRVTYPEID, 'Абон. плата: '||ST.UNAME AS UNAME, A.ID, AI.ANAME AS ADVCOMMENT, AI.CONTRACTNUM, P.SUMM as SUMM, -- 0 as DUR, -- 'шт' as DUR_UNIT, AI.SFNEED, P.QUANTITY as AMOUTH, AI.POSTDISPACH, (select t.SFNUM from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCNUM, (select t.tdate from transactions t where t.id = a.id and t.tdate = (select max(t.tdate) from transactions t where t.id = a.id) and t.SFNUM is not null and rownum=1) as DOCDATE from Accounts A, Accountsinfo AI, Servicetypes ST, services SS, payments P --(select distinct S.ID,S.SRVTYPEID from ) S,(/*select '' AS UNAME,1 AS SRVTYPEID from dual union*/ select 'Абон. плата: ' AS UNAME,-1 AS SRVTYPEID from dual) SS where A.ID=AI.ID AND P.PDATE between :SD AND :ED)
#16
by Wobland
двоеточия мешались? ну я всё не глядел, больно страшно. мог бы после кавычек сразу догадаться ;)
#21
by Wobland
я вижу тут люди знают больше меня.. скажите уж по пути, что не так? после открытия base.eof сразу истина.
#22
by vbh
не буду спорить, не силён в ADODB задача исполнить запрос из файла c:zapros.sql и загрузить его в ТЗ как то так получилось
Тэги: 1С 8
Ответить:
Комментарии доступны только авторизированным пользователям
Похожие вопросы 1С
- Обрезается текст запроса на определенном количестве символов
- Текст построчно в элементе диалога "Текст"
- Определенный диапазон колонок у Excel (ADODB)
- v8: Тонкий клиент и ADODB
- ADODB.CONNECTION - open() вылетает с ошибкой если год - 2012..
- Как в построитель запроса передать текст запроса из ТЗ?
- ADODB.Connection, VFP драйвер и sys(3055,2040)
В этой группе 1С
- Каков критичный размер базы SQL под 8.2 ?
- Решение проблем APC vs PowerChute
- Серии номенклатуры в регистрах
- Как записать значение с кавычками через ЗаписьXML?
- СКД Отчет по отработанному времени ЗУП 8.2 49.1
- Выгрузка в перечень льготных профессий (поименные списки) из ЗУП формат XML
- УПП 1.3 Выпуск брака
- УПП много расчетов себестоимости за один месяц.
- Аналоги номенклатуры в 1С
- Максимальная ширина управляемая форма 8.2
- Объясните дураку. Закрытие месяца и закрытие 20 счетов.
- Виснет COM подключение к 1С
- Работа с весовым товаром в УТ 11
- v7: Как выгрузить список сотрудников в формат excel или txt ?
- Можно ли каким то образом запретить Ctrl+O в 1С 8.2
- v7: Табель учета рабочего времени в 1с 7.7
- В отчете на СКД вывести код для поля группировки
- Процедура ПередЗаписью() и Ссылка
- Как редактировать форму регламентированного отчета
- Дублирование имени объекта метаданных