tablename

SQL 2000 Table Name as variable in stored procedure

与世无争的帅哥 提交于 2019-12-25 04:38:13
问题 Table Name : RM_master Fields : cust_no acct_no acct_code Question is, I want to make the table RM_master as a variable in the parameters in the stored procedure? This has no syntax error but when I execute this in the query analyzer by right clicking on the stored procedure name the variable table name (RM_master) is not identified Here is my stored procedure ; CREATE PROCEDURE RMQUERY @cusnumber nvarchar (255) = '' , @acctnumber nvarchar (255) = '' , @master nvarchar (255) = '' AS BEGIN SET

Entity Framework Core RC2 table name pluralization

徘徊边缘 提交于 2019-12-17 22:22:14
问题 Is there a way to do what this code did in EF Core RC 2? protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Conventions.Remove<PluralizingTableNameConvention>(); } 回答1: There is no convention for this as of EF RC2 build. This is from EF Core team: In past pre-release of EF Core, the table name for an entity was the same as the entity class name. In RC2 we now use the name of the DbSet property. If no DbSet property is defined for the given entity type, then the

LINQ Select from dynamic tableName string

混江龙づ霸主 提交于 2019-12-17 09:58:19
问题 I want to get list of records from an entity model (I'm using EF version 5) with a particular accountID. I'm being supplied with the tableName string (this has to be dynamic) and the accountID. I'm trying the following 2 methods but none of them is working (giving me errors on the IQueryable object 'table': PropertyInfo info = _db.GetType().GetProperty(tableName); IQueryable table = info.GetValue(_db, null) as IQueryable; var query = table.Where(t => t.AccountID == accID) .Select(t => t);

LINQ Select from dynamic tableName string

荒凉一梦 提交于 2019-12-17 09:58:05
问题 I want to get list of records from an entity model (I'm using EF version 5) with a particular accountID. I'm being supplied with the tableName string (this has to be dynamic) and the accountID. I'm trying the following 2 methods but none of them is working (giving me errors on the IQueryable object 'table': PropertyInfo info = _db.GetType().GetProperty(tableName); IQueryable table = info.GetValue(_db, null) as IQueryable; var query = table.Where(t => t.AccountID == accID) .Select(t => t);

Getting list of table names from database in Android application

血红的双手。 提交于 2019-12-12 04:19:26
问题 I am trying to get a list of table names from an SQLite database. I manage to get this, but I also get temporary table names like 'android_metadata' and 'sqlite_sequence'. I want to exclude these 2. However, I can't get it to work right. SQLiteDatabase database = getBaseContext().openOrCreateDatabase("vocabularyDatabase", MODE_PRIVATE, null); Cursor c = database.rawQuery( "SELECT name FROM sqlite_master WHERE (type = 'table') AND (name NOT LIKE 'sqlite_sequence' OR name NOT LIKE 'android

Automating table/object name scan and search in SAS

北城以北 提交于 2019-12-11 03:14:08
问题 OK I'll start with the problem: I have product tables being created every week which are named in the format: products_20130701 products_20130708 . . . I'm trying to automate some campaign analysis so that I don't have to manually change the table name in the code every week to use whichever product table is the first one after the maximum end date of my campaign. e.g %put &max_enddate.; /*20130603*/ my product tables in June are: products_20130602 *products_20130609* products_20130616

Left join with dynamic table name derived from column

大城市里の小女人 提交于 2019-12-09 12:19:24
问题 I am new in PostgreSQL and I wonder if it's possible to use number from table tbc as part of the table name in left join 'pa' || number . So for example if number is 456887 I want left join with table pa456887. Something like this: SELECT tdc.cpa, substring(tdc.ku,'[0-9]+') AS number, paTab.vym FROM public."table_data_C" AS tdc LEFT JOIN concat('pa' || number) AS paTab ON (paTab.cpa = tdc.cpa) And I want to use only PostgreSQL, not additional code in PHP for example. 回答1: Either way, you need

How to get the table name from a field in a join query with MSSQL? (mysql_field_table equivalent)

柔情痞子 提交于 2019-12-03 17:36:58
问题 I'm doing a query manager in Delphi using ADO , I need to know all fields that will be returned by a query, does no matter how complex and how much joins they will have. I want to call a function, that return to me, all fields that will be returned in a specific query, and fields information, like table what is this field from. In mysql with php, I have the command mysql_field_table , in this command I pass the result object and the field index and this command return the table name for me.

Use Mysql lower_case_table_names to 1

匆匆过客 提交于 2019-12-03 17:02:52
问题 I have installed mysql v5.5.17 in linux using yum, now i want default lowercase table names so i have added set-variable = lower_case_table_names=1 in /etc/my.cnf but if i do that then i could not start mysqld service. Mysql logs says unknown variable lower_case_table_names . I have also tried with set global lower_case_table_names=1; in command line but is says its read only variable. any suggestion? 回答1: my OP system is ubuntu, Mysql version is 5.5.* update file /etc/mysql/my.cnf , (must

How to get the table name from a field in a join query with MSSQL? (mysql_field_table equivalent)

回眸只為那壹抹淺笑 提交于 2019-12-03 07:37:40
I'm doing a query manager in Delphi using ADO , I need to know all fields that will be returned by a query, does no matter how complex and how much joins they will have. I want to call a function, that return to me, all fields that will be returned in a specific query, and fields information, like table what is this field from. In mysql with php, I have the command mysql_field_table , in this command I pass the result object and the field index and this command return the table name for me. Well, that is my dream, get the table name from a field index in a query like: SELECT * FROM TableOne