473,699 Members | 2,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find if position 10 trhough 15 are blank in a table

489 Contributor
This is probably a dumb question but I'm having a hard time figuring it out.
I have a field in a table that has a number in the first 10 positions the rest of the field is blank and I want to delete that record from the table. What's the best way.
Thanks
Oct 25 '20 #1
10 4449
isladogs
460 Recognized Expert Moderator Contributor
Create a delete query similar to this using table & field names as appropriate:

Expand|Select|Wrap|Line Numbers
  1. DELETE YourTableName.*
  2. FROM YourTableName
  3. WHERE YourTableName.YourFieldName Is Null;
  4.  
Oct 25 '20 #2
ADezii
8,834 Recognized Expert Expert
I may be reading this incorrectly, but the Record to be Deleted has Numbers in positions 1 to 10 and is Blank starting from position 11. Maybe I am just getting old (LOL).
Oct 26 '20 #3
isladogs
460 Recognized Expert Moderator Contributor
I'm hoping you are reading it incorrectly.
In any case if a field value has 10 numbers and character 11 onwards are null, the field is 10 characters long!

However, if you are correct, my delete query would be completely wrong!
Oct 26 '20 #4
ADezii
8,834 Recognized Expert Expert
I was thinking along the lines that the following Record would not be Deleted. Positions 1 to 10 in the Field are Numeric, but Position 11 on is occupied.
Expand|Select|Wrap|Line Numbers
  1. [Field1]
  2. 7777777777ABC
Wheras, the following Record would be Deleted since the Field in question has numeric values for the first 10 Positions, but Position 11 is not occupied.
Expand|Select|Wrap|Line Numbers
  1. [Field1]
  2. 9876523507
I would say go with your instinct, it is probably keener than mine (LOL).
Oct 26 '20 #5
isladogs
460 Recognized Expert Moderator Contributor
I assumed the OP meant that the first 10 records had numbers in that field and subsequent records had null values for the field

I guess we'll have to wait and see if the OP returns with the 'correct' meaning.
Oct 26 '20 #6
ADezii
8,834 Recognized Expert Expert
In hindsight, my interpretation does seem a little off!
Oct 26 '20 #7
CD Tom
489 Contributor
Sorry for the confusion. The field will have numbers in the first 5 positions (12345 blank) there are other fields in the table that have numbers in the first 5 positions and then characters (12345 abcdef)
I only want to delete those records with numbers and then blanks.
I hope this is a little clearer.
Oct 26 '20 #8
isladogs
460 Recognized Expert Moderator Contributor
First prize goes to adezii!!!!

OK - don't use the DELETE query I gave you earlier!
However, your new description doesn't match the previous one.
Please can you supply several example values and state what you want to happen in each case
Oct 27 '20 #9
SioSio
272 Contributor
According to post # 8
Expand|Select|Wrap|Line Numbers
  1. WHERE LEN(RTRIM(Your_Field_Name)) <= Numeric_digits
Oct 27 '20 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2779
by: Scott Sabo | last post by:
Hello- I have a table (tblCalls) where I import call stats from an application to. The table has fields: CallID, EmpID, EmpName, CallDate, TotalCalls, etc, etc. On the import process I use all fields except CallID & EmpID. The CallID field is ok as it is the autonumber field in the table. But I don't use the EmpID field in the import so it is left blank in the table after importing call stats.
2
3242
by: Todd | last post by:
I am somewhat new to ASP.NET and I am probably overlooking some basic rule that's causing my error. Anyways, here's the scoop: I am using a DataReader to access a SQL stored procedure. I want the result set from the DataReader to be dumped into a DataList and displayed on the page. I already know that my data, the stored procedure, and the database connectivity all work correctly because I have outputted all this data to a dataGrid...
0
1094
by: deepak kumar | last post by:
i have populated html dropdownlst at cleint side using javascript (by putting run as server control property =true)..........now i want to insert the selected text(which user select at cleint side) into a blank table in sql server 2000databases.. e.g if he select 3 then 3 shpuld be inserted blank table....what's code for this(in *.cs file or *.vb file)........ how can i access it in code behind file....................... plz tell me..
2
1300
by: Sam Malone | last post by:
I have these four methods to change the position in a table. However when I invoke any of them nothing appears to happen to the table. It doesn't scroll. The selector pointer doesn't move. Nada!! If I check the row in the table (DataTable2), it IS changing as it should and the DGV IS bound to the data table. Private Sub cmdFirst_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdFirst.Click...
2
16338
by: vunet.us | last post by:
This beautiful code allows a table header to be not scrollable in IE. Since Firefox does not support this CSS method expression(...), the code does not do the desired work in Firefox or other Mozilla browsers. What is the workaround here? I tried position: fixed for Mozilla, but it is making my table header unrelevant to the table, as if these are two different objects. <div style="overflow:auto; height:100px;"> <table cellspacing="0"...
4
5041
by: louvino | last post by:
Hi, my html code is : <div style="position:absolute;top:10px;left:10px"> <table> <tr> <td id="TdBarreBouton1"> <hr> </td>
0
1419
by: mp | last post by:
I am doing some volunteering for a local non-profit aid organization and not very experienced with access. I have a table which is a list of Federal Poverty Line cutoffs based on the number of people in a household. fpl_id NumPeople 75% FPL 100% FPL 125% FPL 150% FPL 1 1 $638.00 $851.00 $1,064.00 $1,276.00 2 2 $856.00 $1,141.00 $1,426.00 $1,711.00 3 3 $1,073.00 $1,431.00 $1,789.00 $2,146.00
0
1070
by: dave | last post by:
I've tried various things for the last two hours, and I give up! What I really need is ImportRowAt(), and it would solve my issue, but since that doesn't exist: I have two tables with identical schema. I run through TableB and if I find a row that matches my criteria, I want to insert it as the FIRST row of TableA, which already contains items. If I could clone the row, it'd meet my needs. If I could InsertAt(0) without the "row is...
5
2176
by: Ron Mowry | last post by:
im trying to figure out how to create a adhock ticketing system through ms access. I have my main table with 20,000 records. Some records may not need to be modified some may need to be and others may need to be duplicated. What I would like to do is create a blank table in the same structure as the original with no records. Then do an unmatched query between those 2 tables so it would catch the records that have been worked already. I would...
3
2135
by: jlmartinezr | last post by:
I have a table created based in a crosstab query, automatically the table was created with the Totals Column in the second column, how I can alter the ordinal position of column Totals using VBA? This comes due that after I show the created table in a web page and the Total columns is showed in second place, additionally this table is dynamic, the rest of the columns could change in name and number of fields, the unique constant is the column...
0
8691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8620
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6536
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2351
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.