Concatenate 'A' with SQL query -


How do I use SQL queries with a field, and if '90' and '99' in the field, its result Will A join?

The final output will look like this.

  91 A92A 93A 94A 95A  

I tried the following.

  SELECT tblgrade.fld1stGrade, 'A' tblgrade WHERE tblgrade.fld1stGrade '90' and '99'  

If your implementation is in the SQL server, then follow the following.

  SELECT tblgrade.fld1stGrade + 'A' to tblgrade where CAST (tblgrade.fld1stGrade int) & gt; = 90 and Cast (as tblgrade.fld1stGrade int) & lt; = 99;  

MySQL implementation is used for the following.

  Select tblgrade from tblgrade.fld1stGrade & gt; Select = 90 and tblgrade to concat (tblgrade.fld1stGrade, 'A') .fld1stGrade & lt; = 99;  

For comparison of multiple categories in MySQL, use something like the following.

Select
  when tblgrade.fld1stGrade & gt; = 90 and tblgrade.fld1stGrade & lt; = 99 then Context (tblgrade.fld1stGrade, 'A') when tblgrade.fld1stGrade & gt; = 80 and tblgrade.fld1stGrade & lt; = 89 then concat (tblgrade.fld1stGrade, 'B') when tblgrade.fld1stGrade & gt; = 70 and tblgrade. Fld1stGrade & lt; = 79 then concat (tblgrade.fld1stGrade, 'C') and end with the concert (description, 'D') grades as support;  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -