Java sqr sqRightFunction(int databaseType, String expr, int length)

Here you can find the source of sqRightFunction(int databaseType, String expr, int length)

Description

sq Right Function

License

Apache License

Declaration

static public String sqRightFunction(int databaseType, String expr, int length) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static public String sqRightFunction(int databaseType, String expr, int length) {
        if (databaseType == 2 || databaseType == 5) // oracle
            return "substr(" + expr + ",-" + length + ")";
        return "right(" + expr + "," + length + ")";
    }// www  .j a  v a  2 s  . c  om

    static public String sqRightFunction(int databaseType, String expr, String length) {
        if (databaseType == 2 || databaseType == 5) // oracle
            return "substr(" + expr + ",-" + length + ")";
        return "right(" + expr + "," + length + ")";
    }
}

Related

  1. sqr(float a)
  2. sqr(float x)
  3. sqr(int V)
  4. sqr(int x)
  5. sqr(int x)
  6. sqrt(double a)
  7. sqrt(double d)
  8. sqrt(double n)
  9. sqrt(double value)