Posts by Eduardo Mendes • 401 points
18 posts
-
0
votes1
answer516
viewsQ: Replace SQL SERVER between columns
How to replace between columns in SQL SERVER. For example, given the table below: COLUNA_A | COLUNA B | COLUNA_C A 123 casa I tried to run the query: SELECT REPLACE(COLUNA_C, COLUNA_A, COLUNA_B )…
-
1
votes2
answers421
viewsA: What are the {} tags in the middle of html
This is a template. Probably another page php is making a include with this page html and making replace in content that has keys for the variable value.…
-
1
votes3
answers55
viewsA: Difficulty in formulating query
The question is very confusing (rs), but from what I understand, I think there is an error of cardinality. See in the image below the relational model of the tables: If you are correct, you will…
sql-server-2008answered Eduardo Mendes 401 -
3
votes2
answers5838
viewsA: Copy data from one column of a table to another of the same table
I’m not sure I understand what you want to do, but it seems to me something very simple. Try to do the following, see if it helps you: update tabela set coluna_decimal = coluna_inteira…
-
3
votes2
answers4370
viewsA: How to "get rid" of vertical space between Divs?
Are the tags p and h2 that are causing the problem. If you add the code below in your css, will note that spaces will be removed. p, h2 { margin: 0; }…
-
3
votes2
answers28028
viewsA: How to make a horizontal line responsive?
You could use the tag <hr /> or the border-bottom in a div #linha { width: 100%; border-bottom: 1px solid #000000; } <div id="linha"> conteudo da div </div> <div> conteudo da…
-
0
votes2
answers431
viewsA: Div with other Divs inside
Replace the height of .tela to 100%. .tela { height:100%; width:300px; border:2px solid #ffec24; }
-
1
votes2
answers943
viewsA: Mysql Error 1215: Cannot add Foreign key Constraint
Missed the unsigned in the foreign key fields of tabela consulta -- 1 -- create database clinica; use clinica; -- 2 -- create table ambulatorio( idnroa int(15) unsigned not null auto_increment,…
mysqlanswered Eduardo Mendes 401 -
3
votes3
answers241
viewsA: Help with Subquery in SQL?
Do as Daniel Saraiva directed, using the left join . Check your query as it should look. I tested it here and it worked. SELECT * FROM responsavel_alunos RespAlunos INNER JOIN pessoas Responsavel ON…
-
2
votes3
answers2411
viewsA: How to record content in a classic Asp Session and move to a mvc page?
See the code below: Default page. <body> <form method="post" method="sessao.asp"> <input type="checkbox" name="ckb" value="1234"> Enviar o valor 1234 deste checkbox.<br>…
-
2
votes2
answers3194
viewsA: Call to a Member Function fetch_assoc() on a non-object
Use the fetch_array(MYSQLI_ASSOC command) require_once("conexao.php"); // Neste arquivo você cria a classe de conexão com o banco $sql = "SELECT * FROM usuarios"; $con = Conexao::getInstanciar(); //…
-
2
votes2
answers94
viewsA: Problems with the footer div
My suggestion is to use the size of height in percentage. I imagine you have another div above the div footer. In the example below I added a div calling for content and put its size in percentage.…
-
1
votes1
answer440
viewsA: Select Union same table
You’re using a sub-query. From "as t", you can no longer refer to the alias "u" and "U1" of the sub-query, that is, of the internal tables. Maybe it would be better if you put the structure of the…
-
0
votes1
answer176
viewsA: How to limit text in columns with CSS?
Unfortunately this is not yet possible. And as amazing as it sounds, column printing only works on IE. In firefox you print the columns, but you still have some errors. And in Chrome, you don’t…
cssanswered Eduardo Mendes 401 -
2
votes1
answer3664
viewsA: Create Divs with text and images
The command to center vertically on css is line-height. Take a look at the code below and see if it fits. .linha { display: table; margin: 5px; } .img { width: 100px; height: 100px; border: solid…
-
1
votes2
answers90
viewsA: Doubt with cast sql server 2008
cast for the case: case (P.ADICIONAL_ESTADO ) when 'S' then CAST(((2.0 / 100 ) * P.PRECO) AS decimal(12, 2)) when 'N' then CAST((P.DESCONTO05 / 100 ) * PRECO) AS decimal(12, 2)) END AS…
sql-serveranswered Eduardo Mendes 401 -
0
votes1
answer61
viewsA: Doubt with for no sql server 2008 command
I found the question a little confusing (rs), and it would be nice to see the structure of the tables, but I hope I can help. To find the individual value of each discount, you could do so: select…
sql-serveranswered Eduardo Mendes 401 -
1
votes1
answer488
viewsA: Pass PHP variable in AJAX
You can put your variable php in a input guy hidden, and send parameters to the file via js. For example: <input type="hidden" id="cliente" value="<?php echo $var_cliente_php; ?>">…