Announcement

Collapse
No announcement yet.

SQL Select Statement Problem with dot

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Select Statement Problem with dot

    Hello,
    I couldn't use "select" when my table field has dot(.) on the field name even I use field parameter (`field.name`). I know that dot shouldn't use on the field name but our tables didn't created by us and we can't do anything about that. And we didn't have any problem when we use the field on the ETL process, some reporting tools and sql tools (workbench etc.). So we only have this problem with SC. Can we do anything to solve that?
    Last edited by sekr; 02-23-2015, 05:09 AM.

  • #2
    You can create a view in your database using another name. Say you have:
    select column.first, column.second from mytable in your database.
    Then create a view:
    create view mytableview as select column.first as cfirst, column.second as csecond from mytable in your database.

    Then use that view instead of the first option.

    Hence the select becomes
    insert into mytableview(cfirst,csecond) values('firstvalue','secondvalue');
    See also (if you are using mysql).
    http://dev.mysql.com/doc/refman/5.0/en/create-view.html

    Comment


    • #3
      But we have 1.5m records on this table. And we're using a lot the fields which has dot. So what should I do, should I create a view for 1.5m records table? or should I create specific views for every query?

      Comment


      • #4
        The amount of records is not the issue the amount of tables you see in your scriptcase is. So for each select with those dots in it you would normally create a view.

        Comment

        Working...
        X