如何获取数据范围并插入数据库或使用之间 [英] How to get Data range and insert to database or using between

查看:88
本文介绍了如何获取数据范围并插入数据库或使用之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,让我解释一下我的项目。我的客户想要扫描两个条形码,它们将在两个数据之间进行扫描,例如textbox1中的第一个输入是SBA0021BC,textbox2是SBA0021CZ,这两个数据之间的范围将是输出并将其插入到数据库中他们可以检查是否有重复的条目。条形码总是包含10个字符。

Ok let me explain my project. My client wants to scan two bar codes, and they will scan between two data, for example the first input in textbox1 is SBA0021BC and textbox2 is SBA0021CZ, and the range of between this two data will be the output and it be inserted into database so that they can check if there is duplicate entries. barcode always contains 10 characters.

INSERT INTO dbbarcodecheck.tblscandata (barcode) values (where barcode between 'a' and 'z' as sample);

推荐答案

您可以尝试 SQL INSERT INTO SELECT语句 [ ^ ]

you can try with SQL INSERT INTO SELECT Statement[^]
INSERT INTO Table2
(barcode)
SELECT barcode 
FROM Table1 where barcode between 'a' and 'z';


这篇关于如何获取数据范围并插入数据库或使用之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆