Jump to content

Recommended Posts

Posted

Boas

Estou com um bloqueio, quero ir buscar os registos deste mês a uma tabela que tem o campo data (formato date)...

Basicamente:


  SELECT* from tabela where data= $variável definida previamente que contém o mês


Desde já agradeço

MCITP-MCTS-MCP

Posted

Fazes data bewteen (inicio, fim) e metes no inicio o primeiro dia do mês e no fim o último dia do mês.

10 REM Generation 48K!
20 INPUT "URL:", A$
30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50
40 PRINT "404 Not Found"
50 PRINT "./M6 @ Portugal a Programar."

 

Posted

...

  SELECT* from tabela where data= $variável definida previamente que contém o mês

...

O código parece-me ok.

...

  ... $variável definida previamente que contém o mês ...

...

Esta parte é que deve corresponder ao mês em causa definido numa tabela de dados, e não deve estar definida como variavel, mas sim numa tabela de dados

Não resolvo dúvidas por PM.

Posted

Tens de ter cuidado com esse código fil79, isso vai apanhar o mês que queres, mas de todos os anos!

Se só quiseres o mês do ano actual, isso não funciona.

10 REM Generation 48K!
20 INPUT "URL:", A$
30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50
40 PRINT "404 Not Found"
50 PRINT "./M6 @ Portugal a Programar."

 

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.