Подключение хд
Собственно бьюсь уже который день. После создания, отключения и любой попытке переместить хд при повторном подключении вылазит данная ошибка:
Не удалось считать информацию о версии Data Warehouse.
Ошибка подготовки (prepare) SQL-оператора:
no permission for read/select access to TABLE TDDWPARAMS
Text SQL:
SELECT *
FROM TDDWPARAMS
Логин и пароль указаны, для достоверности ставил галки для их спроса — итог тот же.
Deductor studio academic 5.3
Нет подключения к БД
Добрый день! Я создала БД в firebird. Пытаюсь подключить БД к дедуктору с помощью data warehouse. При настройках подключения я выбираю нужную БД, ввожу логин/пароль (sysdba/masterkey). При проверке подключения выдает сообщение, что «Тестирование соединения прошло успешно». Но дальше выдает ошибку.
Ошибка проверки подключения:
Не удалось считать информацию о версии Data Warehouse.
Ошибка подготовки (prepare) SQL-оператора:
Dynamic SQL Error
SQL error code = -204
Table unknown
TDDWPARAMS
At line 2, column 6
Text SQL:
SELECT *
FROM TDDWPARAMS
Symptoms
«37000: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared» This error occurs when generating a report.
Cause
There is a comma in a Reference Code.
Resolution
SQL Server interprets the comma as a separator. Remove the comma from the Reference Code within your GL Package and then modify your report formats to avoid this error.
References
Need more help?
Want more options?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
There are 3 tables in a sales database: orders(order_id, user_id, item_id, quantity, date), users(user_id, name, discount_percent) and items(item_id, name, type, price)
. I’m trying to generate a report for the monthly profit by user grouped by days that must look this (snippet):
|-------user--------|----------day_1--------|---------day_2---------|---------day_3---------| etc. |
|-user_name_1-|-sum_of_expenses-|-sum_of_expenses-|-sum_of_expenses-| etc. |
|-user_name_2-|-sum_of_expenses-|-sum_of_expenses-|-sum_of_expenses-| etc. |
I used the following prepared statement to achieve this:
SELECT
GROUP_CONCAT(DISTINCT CONCAT('SUM(IF(DATE(orders.date) = '',
DATE(orders.date),
'', orders.quantity * items.price * (1 - users.discount_percent / 100), 0)) AS ',
DATE(orders.date))
ORDER BY DATE(orders.date))
INTO @sql FROM
orders;
SET @sql = CONCAT('SELECT users.name, ', @sql, ' FROM
users
INNER JOIN
orders ON users.user_id = orders.user_id
INNER JOIN
items ON orders.item_id = items.item_id
GROUP BY users.name
ORDER BY users.user_id');
PREPARE statement FROM @sql;
EXECUTE statement;
DEALLOCATE PREPARE statement;
For some reason it gives me a warning:
1 row(s) affected, 1 warning(s): 1260 Row 8 was cut by GROUP_CONCAT()
And then an error:
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2015-01-01,SUM(IF(DATE(orders.date) = '2015-01-02', orders.quantity * items.pric' at line 1
I think this has something to do with the format of the date or the quotes, but everything I type in order to fix it fails.
Also I’m trying to figure out how to implement this complex statement via php’s mysqli prepare() method.
Помоги пожалуйста :). Я получаю эту ошибку:
Warning: mysqli::prepare() [mysqli.prepare]: (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id))' at line 1 in ***/classes/db.mysql.class.php on line 69
Warning: mysqli::prepare() [mysqli.prepare]: (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?)' at line 1 in ***/classes/db.mysql.class.php on line 75
на этот вызов php-кода:
public function createTable($tableName) {
$this->connect();
if ($stmt = $this->dbSocket->prepare("CREATE TABLE ?(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id))")) {
$stmt->bind_param("s", $tableName);
$stmt->execute();
$stmt->close();
}
if ($stmt = $this->dbSocket->prepare("INSERT INTO sys_userTables(userTableName) VALUES (u_?)")) {
$stmt->bind_param("s", $tableName);
$stmt->execute();
$stmt->close();
}
$this->disonnect();
}
$ tableName является строкой и передается правильно.
Метод connect():
private function connect() {
$this->dbSocket = new mysqli($this->dbHost, $this->dbUser, $this->dbPassword, $this->dbDatabase);
if (mysqli_connect_errno()) {
printf("Brak połączenia z serwerem MySQL. Kod błędu: %sn", mysqli_connect_error());
exit();
}
}
ТИА.