package main

import (
	"database/sql"
	"fmt"
	"log"
	_ "github.com/denisenkom/go-mssqldb"
)

func main() {
	connString := "server=192.168.10.61;user id=pond;password=Ehongmd2025;database=CONFIG;encrypt=disable"
	db, err := sql.Open("sqlserver", connString)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	var count int
	err = db.QueryRow("SELECT COUNT(*) FROM LOAN3_CSV WHERE UPDATE_M LIKE '0%'").Scan(&count)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("Records with leading zero in UPDATE_M: %d\n", count)
}
