Questions tagged as 'sql'

1
answer

How to model a feedback system

I'm developing an application in Rails. I would like to know how to model the comments part. There is a table for the calls (Helpdesk system), and it is related to the history table, which is the comments. My question is, how can I find out who...
asked by 02.04.2015 / 21:40
1
answer

Update tables with the same data in row

When I add a A category, and add a X product with the A category (categories table), after that it will edit the category name A to category B , the category of product X (table products) remains with the category...
asked by 09.06.2015 / 19:13
3
answers

Code to show the data of the client that logged in

Well my question is this, when I log in how do I get the session data? I think it's a select, but in doing so I have to create a session? Because I want to fetch the data only from this client that logged in. I already have login.php...
asked by 10.06.2015 / 22:59
1
answer

Error in NamedQuery

Good evening guys, I'm trying to create a namedquery with a query in the database. Following: @NamedQuery(name="ListagemProdutosMesa",query="select Produto p FROM Produto p, Pedido pe, Conta c, Pedido_produto pp where pe.id = pp.pedido...
asked by 13.05.2015 / 03:58
1
answer

check the available time periods in the SQL table

I'm developing a scheduling schedule for a software that manages schedules available for scheduling, it seems odd that I post this here more by incredible than it seems I did not find anything of the genre here on the web, well my scenario is as...
asked by 14.04.2015 / 06:11
3
answers

How to optimize the query in a remote bank using ClientDataset?

I am using a ClientDataSet to query on a remote database, the table has more than 100,000 records and is getting very slow, the SQL I am using is: select (coalesce (cast(A.con_baixa as date),current_date) - cast(A.con_vencto as date) )Diastra...
asked by 25.03.2015 / 18:04
1
answer

Double-reference the same table in another table

My question is this: I have to design a system for a health care institution that has internal physicians. There are users, and each user has an internal doctor. Each patient also has a family doctor of the SNS. A doctor can be an internal do...
asked by 25.03.2015 / 20:52
1
answer

Transfer date value from Form1 to class c # windows form .net [closed]

I'm working with windows form .net c # but I do not have much practice and would like some help ... I have a calendar component in a form1 and after running the application, a date is selected which is stored in a var.Até alright. I created a...
asked by 13.03.2015 / 20:49
1
answer

How to limit the results of a query in DB4O?

How can I create a query that returns a limited number of results such as limit of MySQL? I'm looking at the documentation and I'm not finding it.     
asked by 15.03.2015 / 03:23
1
answer

Inner Join, multiple Inserts with multiple conditions

Well, it's the following, I do not understand where I should start, if I must first select the clients, I'm sure I'll use inner join or some joiner since it uses other help tables. I wanted help to understand how to do this query....
asked by 10.03.2015 / 13:48