Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
jothaz

Seleciona LinhaXColuna - tipo bingo

Question

DECLARE  @TMP TABLE ( LINHA1 CHAR(2), LINHA2 CHAR(2), LINHA3 CHAR(2), LINHA4 CHAR(2))
INSERT INTO @TMP ( LINHA1 , LINHA2 , LINHA3 , LINHA4 )
VALUES ( '12', '82', '46', '35')
INSERT INTO @TMP ( LINHA1 , LINHA2 , LINHA3 , LINHA4 )
VALUES ( '45', '63', '78', '34')


DECLARE @CRITERIO VARCHAR(40)
SELECT @CRITERIO = '12,82,46,35' 
SELECT * FROM @TMP
WHERE (LINHA1 + ',' + LINHA2  + ',' +  LINHA3  + ',' +  LINHA4) = @CRITERIO

Considerações finais:

Fonte/Autor/link

AUTOR: "Jothaz"

Dúvidas, criticas, contribuições, correções e adições serão bem vindas.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

Cloud Computing


  • Forum Statistics

    • Total Topics
      148386
    • Total Posts
      643773
×
×
  • Create New...