0 Replies Latest reply on Feb 5, 2014 2:00 AM by kenleeltk

    SQL Text for ODBC SQL Query Builder

    kenleeltk

      Title

      SQL Text for ODBC SQL Query Builder

      Post

           I am used to import the record by using ODBC SQL Query Builder though program

           And i am using the following SQL text to import the record

            

           SELECT "his_patient_3_years"."Address Line 1", "his_patient_3_years"."Address Line 2", "his_patient_3_years"."Address Line 3", "his_patient_3_years"."Admission Date", "his_patient_3_years"."Admitting Doctor", "his_patient_3_years"."Anaes Start Time", "his_patient_3_years"."Anesthetists Code", "his_patient_3_years"."Anesthetists Name", "his_patient_3_years"."Discharge Date", "his_patient_3_years"."DOB", "his_patient_3_years"."Doctor Code", "his_patient_3_years"."Document ID", "his_patient_3_years"."Document Type", "his_patient_3_years"."ICD Code", "his_patient_3_years"."In Number", "his_patient_3_years"."Occupation", "his_patient_3_years"."Patient Name", "his_patient_3_years"."Patient Number", "his_patient_3_years"."Procedure Name1", "his_patient_3_years"."Procedure Name2", "his_patient_3_years"."Procedure Name3", "his_patient_3_years"."Procedure Name4", "his_patient_3_years"."Procedure Name5", "his_patient_3_years"."Recovery Arrival Time", "his_patient_3_years"."Recovery Discharge Time", "his_patient_3_years"."Remarks", "his_patient_3_years"."Sex", "his_patient_3_years"."Stay Mode"
           FROM "his_patient_3_years"
           WHERE "his_patient_3_years"."Patient Number" LIKE N'%1401%'
            

           The program is run successfully.

            

           But i want to make some change on WHERE condition.

           Now, I am using a fixed value to do the filer. But i want to use value to instead of using a fix value

           the fix value"1401", this four digit is used to represent "YYMM" first two digit is year and the last two digit is talking about month.

           How can i change the "WHERE" condition value from fixed value into flexible value?