Jump to content

jteixeira

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by jteixeira

  1. jteixeira

    Update

    By wrong i make an update that update me all Table for 0.70, it is possible to put right that the begin? (Sorry my english)
  2. Select "colums name"from table1 INNER JOIN table2 on table2.(foreign column)=table1.(foreign column) INNER JOIN table3 on table3.(foreign column)=[table1.(foreign column) or table2.(foreign column)]
  3. you have a tutorial ---> http://www.w3schools.com/sql/default.aspUse Microsoft SQLSERVER Express and if you need some help, say
  4. jteixeira

    If Condition

    How i do it? can you help me?
  5. jteixeira

    If Condition

    if(select stock from Stockss Where stock=0)=0Begin Print 'erro'EndErro ---> Msg 512, Level 16, State 1, Line 1Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
  6. jteixeira

    If Condition

    But this only do to return one value, if i try this to return more then a value it doesn't work
  7. jteixeira

    If Condition

    Microsoft SQL Server Management STudio Express
  8. jteixeira

    If Condition

    I have this Query ---->Select Infofin_prod.maquinaid,nicname,Infofin_prod.idprod,NomeProd,StockFrom Infofin_prod INNER JOIN Maquina on maquina.maquinaid=Infofin_prod.maquinaid INNER JOIN Stockss on stockss.maquinaid=Infofin_prod.maquinaid INNER JOIN Produtos on produtos.idprod=Infofin_prod.idprodGroup by Infofin_prod.maquinaid,nicname,Infofin_prod.idprod,NomeProd,StockOrder by StockI Want print a message if the Stock = 0, but i don't know i do it with a if condition
  9. Select top 10 Column,Count(*) From Tabel Group by ColumnOrder by count(*) DESC
  10. jteixeira

    If Condition

    I have made a query and i would like to make a if condition to print when the nvendas = nvendascartaoSelect InfoFinanceira.maquinaid,nicname,nvendas,nvendas_cartao,nvendas-nvendas_cartao "Diferencial"from InfoFinanceira INNER JOIN Maquina on maquina.maquinaid=InfoFinanceira.maquinaid INNER JOIN Contadores on contadores.maquinaid=InfoFinanceira.maquinaidGroup by InfoFinanceira.maquinaid,nicname,nvendas,nvendas_cartaoOrder by nicnamecan we help me?
  11. jteixeira

    Hour and Data

    Select Avarias.Maquinaid,nicname,Avarias.tipo,Avarias.Data,Avarias.horafrom Avarias INNER JOIN Maquina on maquina.maquinaid=Avarias.maquinaidGroup by Avarias.Maquinaid,nicname,Avarias.tipo,Avarias.Data,Avarias.horaOrder by Avarias.MaquinaidI Want join Avarias.Data to Avarias.hora
  12. jteixeira

    Hour and Data

    In the same table i have in one column the hour and in the other the data. How can I join the 2 columns to apear in one hour and date?
  13. Select NomeAvaria,Count(*) "Maquinas"From Avarias INNER JOIN DESCAvarias on DESCAvarias.TipoAvaria=Avarias.tipoGroup by NomeAvariaOrder by Count(*)I Want Make a MAX of this Query and i don't know how to do it
  14. jteixeira

    Max Before Count

    How can I do a Max function in one count functions for obtain the max of count
×
×
  • Create New...