Questions tagged [tablename]

143 questions
5
votes
1 answer

Make Oracle limit larger than 30

We all know that Oracle has limit of 30 bytes for object names table names columns and bla-bla, I have been searching the net for hours for a solution but I couldn't find anything and eventually I gave up. We are developing an application that uses…
Shahe
  • 964
  • 2
  • 13
  • 34
4
votes
2 answers

Get current table name in query

Is it possible to get table name in select statement? Example: SELECT Id, "Users" as TableName FROM Users I don't want to write "Users" manually but to determine it based on FROM statement. I'm doing some migrations from one database to another…
zhuber
  • 5,364
  • 3
  • 30
  • 63
4
votes
0 answers

sql server join query does not include table names for columns with the same name

I am migrating a jet database to MS SQL Server. The application is well established and contains tens of thousands of lines of code and possibly well over a 100 thousand line of code. When using adodb recordsets (in vb.net) to query a jet database…
abdulla
  • 41
  • 1
4
votes
2 answers

oracle select * from variable table name

ORACLE: So far nothing I have tried has worked. I wish to display on the screen the results of select * from my_table. In this case my_table = select table_name from all_tables where owner='ABC' and name like 'ABC%'. Table name would be a plus,…
user3586521
  • 63
  • 1
  • 2
  • 5
3
votes
1 answer

MySQL Variables storing database name

I have a long script that I need to run on several different databases (all witht he same tables and field names). What I would like to do is something like this: 1 SET @TARGET_DATABASE = 'beta' 2 SET @SOURCE_DATABASE = 'sandbox'; 3 4 CREATE…
Max Kielland
  • 5,627
  • 9
  • 60
  • 95
3
votes
1 answer

Insert individual table_name as column value in all tables

I work with a database that has hundreds of tables with the very same structure and an identical syntax. Everyday more tables are created, thus the database is continuously growing. To dynamically append this growing amount of tables I use a MySQL…
Tobi Z
  • 31
  • 1
3
votes
1 answer

Entity framework table names mapping at runtime

I need to import a huge amount of data without db work interruption. So there are two tables: Data and DataTemp(they are identical). At first data is uploaded to the temp table and then tables are swapped by backing up Data table and renaming…
SergB
  • 91
  • 7
3
votes
3 answers

How to use dynamic table name in SELECT query using JDBC

I have 5 or table table to query from \ my syntax i like this String sql2 = "SELECT * FROM ? WHERE Patient_ID = ?"; pst = conn.prepareStatement(sql2); System.out.println("SQL before values are set "+sql2); System.out.println("The…
Nawaz
  • 413
  • 2
  • 7
  • 16
3
votes
1 answer

MySQL query on all databases with the same table and column names

Assume we have the following 2 databases: DROP DATABASE IF EXISTS `adb`; CREATE DATABASE `adb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `adb`; CREATE TABLE IF NOT EXISTS `Login` ( `ID` bigint(20) NOT NULL, …
debo
  • 45
  • 9
3
votes
1 answer

Error "You have an error in your SQL syntax;" near table_name

This is my Coding : session_start(); include 'Connect.php'; $userid=$_SESSION['userid']; $tanggal=date('Y-m-d h:i:s'); $status='Pending'; echo $userid; echo $status; echo $tanggal; mysql_query("INSERT INTO 'Order'…
2
votes
3 answers

Using result of SQL Query as table name in mysql trigger

I've to write a trigger on my table which will perform the following functions. Before Update on row, check price of Item If price has changed from the last price, then select the table name, where to insert the item name, from another table having…
Amresh Kumar
  • 1,445
  • 17
  • 30
2
votes
0 answers

How can I Alias Table name?

I am using PostGreSql as database, I have tables in pgAdmin. I want to set as alias to table myData. I have tried using AS or ALIAS but nothing works for me. Here is my class class Product extends Model{ constructor(conn, schema){ …
A Aama
  • 31
  • 5
2
votes
1 answer

Presto : how to select on a table_name with special characters

How to make a select on a table containing special characters with presto on SQL Server. For exemple : select * from myconnecter.[XXX, s_a_$item ledger entry]; My table name is [XXX, s_a_$item ledger entry] and I have this error: failed: line…
robino
  • 31
  • 1
  • 3
2
votes
1 answer

How to process dynamic tablenames

I have a number of tables which I need to combine into one structure using Linq I need to process a number of tables that have the same structure but different table names (financial data spread across 20 years). I can create code to access the…
Cliff C
  • 143
  • 1
  • 10
2
votes
1 answer

Symfony doctrine migration rename table with relations

I`m trying to change a table name with doctrine migrations. Example table name is model and I want to change it to new_model. /** * Class Model * * @package AppBundle\Entity * * @ORM\Table(name="new_model") *…
Erik
  • 427
  • 6
  • 14
1
2
3
9 10