sql server - SQL IF- ELSE if Statement - Or Case -
I am trying to do something with SQL and wondering if this would be possible. I have a spreadsheet that looks like this
type Qnty details MISCNUMB is a 1 one is a ABC A1 a bla bla ASD A2 asdasdsa 23213 b12 two a 321 b 1111 c 122312 DRE 321 In which I can have duplicated values in some columns.
When I select the type from the table, does not all the repeated values be found and only one copy example?
Do I if- ELIF to compare columns in each table and write a question? Another thing is that my data is so large that I can not go through the data to create a case statement for everyone. I finally want to be able to search for a data like this
if type = A> gt; Show qnty & gt; (After the user has selected those values) & gt; Then selected qnty & gt; Show details in relation to Show different numbers
Select from TABLE_1 Question = 'A' (should I get technically 1,1,2 rights?) Pseudo code = IF Qnty = '1' from table then only Show details and MISC are numb for those values, and show the rest)
Second An attempt to understand it DECLARE @ TABLE_1 Table (Type NVHAR, QINI INT, Description NVHAR (100), MISCANBN NHARAR (100)) DECLARE @ User CHAOOSOSATION INT @ TABLE_1 VALUES ('A', 1, (' A ', 2,' Random Text 2 ',' AAA 2 '), (' A ', 1,' Random Text 1 ',' AAA1 '), (' B ', 12),' Random Text 3 ' 'AAA3'), ('B', 1111, 'Random Text 4', 'AA 4'), ('C', 122312, 'Random Text 5', 'AA5') SELECT Qnty FROM @ TABLE_1 WHERE type = Select 'B' @ User Search option = 12, select details, MISCANB FA @ Tabli, where Kni = user chooser
Comments
Post a Comment