Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

SQL

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hello

I have an Order HTML page where a User can enter data into fields.  On Submit PHP file is used to write the data to SQL Tables called Orders and Orders_details.

Currently, when l test this I'm getting the below error.
Capture.JPG
Below is my PHP file:
If you need table structures I can provide these too.

The line error is highlighted below.
Capture.JPG===================

<!DOCTYPE HTML>
<html>
<head>
<title>Product_Order</title>
<meta charset="utf-8">

</head>
<body>

<?php

  /* Set oracle user login and password info */
  $dbuser = ;  
  $dbpass = ;  
  $db = ;
  $connect = oci_connect($dbuser, $dbpass, $db);

   /* Display connection error if fails */
  if (!$connect)  {
    echo "An error occurred connecting to the database";
    exit;
  }

  //Extract CGI variables
  $productitem = $_POST['productitem'] ;
  $price = $_POST['price'] ;
  $quantity = $_POST['quantity'] ;
  $firstname = $_POST['firstname'] ;
  $lastname = $_POST['lastname'] ;
  $address = $_POST['address'] ;
  $phone = $_POST['phone'] ;
  $email = $_POST['email'] ;
  $creditcard = $_POST['creditcard'] ;


  // count the record in orders table and use id number $count+1 for the new record
  $query_count = "SELECT max(ID) FROM Orders";

  echo "SQL: $query_count<br>";

  /* check the sql statement for errors and if errors report them */
  $stmt = oci_parse($connect, $query_count);

  if(!$stmt)  {
    echo "An error…
0
Free learning courses: Active Directory Deep Dive
LVL 1
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Hello,

I have the below search field in my HTML file.

Capture.JPG
This is connected to a PHP file on Submit.

If the User clicks on 'Search' only, without entering any data, I want all data to be displayed.
Currently, it will only display data it you enter at least one character.

Here is my SQL Select Query within my PHP file.

$query = "SELECT * FROM Products WHERE regexp_like(Title,'$book_name','i')";
0
I am trying to use a query in VBA Access. There is a criteria that involves a Form. As I understand it I have to use Eval for the DAO to understand the query. I have tried but I keep getting errors.

Below is the query, The Normal SQL VBA query, and what I have tried with Eval.  Thanks for the help.

Query:
SELECT SKUs.SKU, SKUs.SkuNm, Assemblies.Quantity
FROM SKUs INNER JOIN Assemblies ON SKUs.SkuID = Assemblies.ChildSkuID
WHERE (((Assemblies.SkuID)=[Forms]![frmPrintChildrenLabels]![txtParent].[value]));

Open in new window


VBA String:
sSQL = "SELECT SKUs.SKU, SKUs.SkuNm, Assemblies.Quantity" _
& " FROM SKUs INNER JOIN Assemblies ON SKUs.SkuID = Assemblies.ChildSkuID" _
& " WHERE (((Assemblies.SkuID)=[Forms]![frmPrintChildrenLabels]![txtParent].[value]));"

Open in new window


What I have tried but compile error expected end of statement:
VBA String:
sSQL = "SELECT SKUs.SKU, SKUs.SkuNm, Assemblies.Quantity" _
& " FROM SKUs INNER JOIN Assemblies ON SKUs.SkuID = Assemblies.ChildSkuID" _
& " WHERE ((([Assemblies].[SkuID])= Eval("[Forms]![frmPrintChildrenLabels]![txtParent].[value]")));"

Open in new window

0
Hi Experts,

on my SQL AG I have some new DNS errors.
I use SQL2014 in an availabilty group.
On the Failover cluster I have  this errors, many time each day.
Can you help me out ?

Cluster network name resource 'BMD_BMD-DB' failed registration of one or more associated DNS name(s) for the following reason:
DNS operation refused.
0
I've just run a SQL command something like this and discovered  I have trailing white space in  file.path  how do I remove it?

select m.id ,m.title,m.tmdbid,m.imdbid,mlf.fileid,f.path from movie m,movielinkfile mlf,file f where m.id=mlf.movieid and mlf.fileid=f.id and  f.path like '%My Film Name%' order by m.title

Open in new window


Resulting in
--m.id ,m.title,m.tmdbid,m.imdbid,mlf.fileid,f.path
"2407","My Film Name","","","2569","Path1/to/My Film Name.mp4"
"2407","My Film Name","","","4850","Path2/to/My Film Name.mp4
" -- trailing white space
"3837","My Film Name","1234","tt123456","5318","Path2/to/My Film Name.mp4"

Open in new window


This means movie.id 3837 is a duplicate of movie.id2407 but wasn't picked up because of the trailing white space  not sure if '\n,CR or LF'

if possible before removing 3837 I'd like to grab the m.tmdbid,m.imdbid values and update 2407 if NULL  the only thing that links the 2 is "path2/to/My Film Name.mp4"

I think there is over 500 duplicates with  trailing white space every thing with a f.id >= 5216 maybe duplicate and have entries for  m.tmdbid,m.imdbid and <= 5216 may or may not have  m.tmdbid,m.imdbid values

Primarily after Removing the duplicate 3837 I then need to remove the trailing white space from f.path I can't do it before because it's indexed and won't allow duplication
0
Hi Guys

I built the below query and set it up as a Stored Procedure in SQL 2008, query:

USE [Cosmos]
GO

/****** Object:  StoredProcedure [dbo].[Tour]    Script Date: 9/16/2017 10:28:34 PM ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:     
-- Create date: 
-- Description:
-- =============================================

ALTER PROCEDURE [dbo].[TourDesk] 
@TourStartDate AS DATETIME, @TourEndDate AS DATETIME

AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
   SET NOCOUNT ON;
-- Query
SELECT 
	t.sale_no as [Sales Number]
	,t.trans_no as [Transaction Number]
	,t.department as [Department]
	,t.category as [Category]
	,t.item as [Product Name]
	,CAST(t.date_time as DATETIME) as [Date of Sale]
	,t.init_price as [Initial Price]
	,t.quantity as [Quantity]
	,t.disc_amt as [Discount Amount]
	,t.disc_flat as [Discount Flat]
	,t.tax_amount as [Tax Amount]
	,t.extension as [Extension]
	,t.pcsplit_1 as [Profit Center EX GST]
	,SUM(CASE WHEN t.item in ('PJB.EB.AD', 'PJB.CO.CH', 'PJB.EB.CH', 'PJB.EB.FAM', 'PJB.PM.AD', 'PJB.PM.CH', 'PJB.PM.FAM') THEN (t.quantity*(t.init_price*0.7)/1.1)
	WHEN t.item IN ('AQDUCK.FAM', 'AQDUCK.SEN', 'AQDUCK.AD', 'AQDUCK.CH') THEN (t.quantity*(t.init_price*0.7)/1.1)
	WHEN t.item in ('SC.GW.AD', 'SC.GW.CH', 'SC.GW.SEN', 'SC.HOP.AD', 'SC.HOP.CH', 'SC.HOP.SEN', 'SC.NB.AD', 'SC.NB.CH', 'SC.NB.SEN', 'SC.OT.AD', 'SC.OT.CH', 'SC.OT.SEN', 'SC.WW.AD', 'SC.WW.CH', 

Open in new window

0
Hello - need assistance with writing a nested IIF statement in a MSACCESS query

Here is what I am trying to do:

If COMPONENT = MED, then I need to look at the difference between REFILLS ALLOWED and REFILLS REMAINING.  If they are equal numbers the result will be START. If they are not equal, then result should be "REFILL"

If COMPONENT IS NOT "MED", then need to look at the difference between REFILLS ALLOWED and REFILLS REMAINING.  If the difference between  REFILLS ALLOWED and REFILLS REMAINING is -1, Then  the result will be START. If the difference is more than 2, then result should be "REFILL".  

Note: REFILLS ALLOWED will always have a bigger number than Refills Remaining.

I tried.... but this does not work....
STATUS: IIf([COMPONENT]= "MED"& [REFILLS_ALLOWED] = [REFILLS_REMAINING], "START",REFILL",IIf([COMPONENT] NOT "MED" & [REFILLS_ALLOWED] = [REFILLS_REMAINING] -1, "START", IIf([COMPONENT] NOT "MED" & [REFILLS_ALLOWED] = [REFILLS_REMAINING] >-2, "REFILL",

EXAMPLE
Component    Refills Allowed         Refills Remaining             Status
   MED                    3                                    3                                START
    SOL                     3                                    2                                START
    MED                   3                                     1                                 REFILL
    MED                   2                                     0                                REFILL…
0
Hi

We have SFB 2015 installed in our network. Due to some issue we have to remove the servers from network after deleting all instances of SFB and SQL from network. Now when we have reinstalled new servers and tried to publish a topology its shows an error where it is still pointing to old Server.

OLD SERVER FQDN: dclyncsql.gsi.gov.in
NEW Server: dccluster.gsi.gov.in

Please help me in how to remove instance of the old server and how to find out why it is still pointing to that database when all servers and SQL instances has been removed.

Thanks

Avijit
GSI-Error.jpg
0
Below is the sample data:
Country;     Value
AAA          10
AAA           12
AAA           14
AAA           35
AAA           72
AAA           827
AAA           992
AAA           1000
AAA           1001
AAA           1002
BBB           12
BBB          15
BBB          26
BBB           27
BBB          30
BBB           33
BBB           50
BBB           400
BBB          800

My Final table should be as below
Country     FirstQ     ThirdQ     InterQ
AAA         XXX        YYY        ZZZ
BBB         XXX        YYY        ZZZ

I got the solution partially from this site  by CYBERKIWI

;with tmp as (
      select c=COUNT(*) over (), rn=ROW_NUMBER() over (order by n), n
      from quartile_test)
,qs as (
      select
            q1=1+(c-1.0)/4, q1a=FLOOR(1+(c-1.0)/4), q1b=CEILING(1+(c-1.0)/4),
            q2=1+(c-1.0)/2, q2a=FLOOR(1+(c-1.0)/2), q2b=CEILING(1+(c-1.0)/2),
            q3=1+(c-1.0)*3/4, q3a=FLOOR(1+(c-1.0)*3/4), q3b=CEILING(1+(c-1.0)*3/4)
      from (select top 1 c from tmp) x)
select (1-q1+q1a)*MIN(n)+(q1-q1a)*MAX(n)
from tmp,qs where rn in (q1a,q1b) group by qs.q1,qs.q1a,qs.q1b
union all
select (1-q2+q2a)*MIN(n)+(q2-q2a)*MAX(n)
from tmp,qs where rn in (q2a,q2b) group by qs.q2,qs.q2a,qs.q2b
union all
select (1-q3+q3a)*MIN(n)+(q3-q3a)*MAX(n)
from tmp,qs where rn in (q3a,q3b) group by qs.q3,qs.q3a,qs.q3b
union all
select n
from tmp,qs where rn=c


Can someone help me modify this as per country?
0
I have an Access 2010 table containing 196 records where a particular field appears blank (length = 0) but must contain something as setting the filter to Is Not Null shows these "blank" records and all others.  I tried searching for Ascii characters using Asc([Fieldname]) but that returned "#Func!" which, I'm guessing, means nothing was found or it doesn't recognize the function.  I also tried Asc(Left([Fieldname],1)) and Asc(Right([Fieldname],1)) but got the same result.

I need to replace these invisible characters with null values.  To do that I first need to identify what they are.  Any suggestions on how to do this would be greatly appreciated.
0
NEW Veeam Agent for Microsoft Windows
LVL 1
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Hi experts,

I'm using ASP.NET MVC 5 with C#

On my view I have a DisplayFor displaying a datetime field.

My date time field is stored in sql server as datetime format

This is my current razor for this label on my page.

@Html.DisplayFor(m => m.MyTestDate)

With this syntax the browser displays this on my page.

07/17/2017 07:30:00 AM


Question 1: How do I format the razor DisplayFor tag to display only the date like this?:

07/17/2017

Question 2: How do I format the razor DisplayFor tag to display only the time like this?:

07:30:00 AM
0
I am trying to execute this stored procedure to insert.  The parameter @pImagePath is being passed in (for example) is:  \\server\image.png

This procedure produces the error:
Msg 402, Level 16, State 1, Procedure spWIPImageInsert, Line 24
The data types nvarchar and varbinary(max) are incompatible in the add operator.

How can I insert this image?

Here's the procedure code:
ALTER PROCEDURE [dbo].[spWIPImageInsert]
   @pUserName varchar(50),
   @pMachineName varchar(50),
   @pPartNum varchar(50),
   @pImagePath varbinary(MAX)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	DECLARE @SQL VARCHAR(MAX)

	DECLARE @SQL_ERROR INT
	SET @SQL_ERROR = 0

	SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
	BEGIN TRANSACTION

	SET @SQL = N'INSERT INTO [dbo].[WIPImage]([FromUserName], [MachineName], [PartNum], [Image]) SELECT ''' + @pUserName + ''', ''' + @pMachineName + ''', ''' + @pPartNum + ''', BulkColumn FROM OPENROWSET(BULK '''+@pImagePath+''', SINGLE_BLOB) AS IMAGE'

	EXEC (@SQL)


	SELECT @SQL_ERROR = @@ERROR

	IF @SQL_ERROR = 0
	BEGIN
	  COMMIT TRANSACTION
	END
	ELSE
	BEGIN
	  ROLLBACK TRANSACTION
	END

END

Open in new window

0
I have an aspx page that runs a stored proc. The stored proc returns a value ( a record ID) after performing a few insert statements.  I want to get that return value with vb code.  My current code (see * below) gets an error message: "Input string was not in a correct format."  I can't find the right code to get the return value.  What is the flaw(s) in my code?

Thanks for looking.

The stored proc:
CREATE PROCEDURE [dbo].[CreateEval]
	    @EmployeeNumber int
	  , @EmpLastName varchar(30)
	  , @EmpFirstName varchar(30)
	  , @EmpDepartmentID int
	  , @EmpJobTitleID int
	  , @SupervisorID int
	  , @SupLastName varchar(30)
	  , @SupFirstName varchar(30)
	  , @SupervisorDeptID int
	  , @SupervisorTitleID int
	  , @EvalID int = NULL OUTPUT
AS

BEGIN
	/*some inserting happens here		
END

BEGIN
	/*some inserting happens here		
END

BEGIN
	INSERT INTO EvalHeader
		(EmployeeNumber
	   , SupervisorID
	   , EvalDate)
	VALUES (@EmployeeNumber
		  , @SupervisorID
		  , GETDATE())
	SET @EvalID = SCOPE_IDENTITY()
	
	INSERT INTO EvalScoring
		(EvalID)
	VALUES (@EvalID)
	RETURN 
END

Open in new window


Here is the sql data source:
<asp:SqlDataSource ID="dsCreateEval" runat="server" ConnectionString="<%$ ConnectionStrings:EmpEval_TestConnectionString %>" SelectCommand="CreateEval" SelectCommandType="StoredProcedure"
        InsertCommand="CreateEval"
        InsertCommandType="StoredProcedure">
        <InsertParameters>
            
            <asp:ControlParameter 

Open in new window

0
Hello,

I'm trying to convert single row records in SQL 2008 that look like this:

PrID      Type      Color       Shape      Qty      Store      OrderDt      
2299      Plate      Blue      Round      2      LA              06/02/16
3342      Vase      Clear      Long      4      NY              08/22/17

Into multiple rows records that look like this:
      
PrID      Attr              Value
2299      Type      Plate
2299      Colro      Blue
2299      Shape      Round
2299      Qty               2
2299      Store      LA
2299      OrderDt      06/02/16
3342      Type      Vase
3342      Color      Red
3342      Shape      Long      
3342      Qty               4
3342      Store      NY
3342      OrderDt      08/22/17

I don't want to use Union All because of efficiency.  

Thanks for your help!
0
How can I use a CASE statement to check if a field contains alpha characters?

Ex
CASE F1 CONTAINS [A], [B] ....
0
I am trying to upgrade from SQL 2008R2 express to 2012.  Everything passes during the system checker part of install... Fails during the upgrade rules section... Please see attached screenshots.  thanks.

pass
fail
meaning
0
Hi, Experts,

is there a way to create a one time query that queries the same select statement for each month in your database? this is assuming that there is no month/calendar table created.

What's the best approach and can you provide code examples of how to do this?
0
Hello

I am trying to perform an Ms Access to mySQL migration as per this procedure.

Overall things seem to work as expected until I am prompted with this dialog (where I would be expecting my tables)
mdb
then the code seems to crash:

Starting...
Connect to source DBMS...
- Connecting...
Connecting to ...
Opening ODBC connection to DSN=product2013...
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\db_generic_re_grt.py", line 634, in connect
    return GenericReverseEngineering.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\db_generic_re_grt.py", line 122, in connect
    con = db_driver.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\workbench\db_driver.py", line 91, in connect
    connection = library.connect(connection_string, password=password)
pyodbc.Error: ('HY000', 'The driver did not supply an error!')

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\workbench\wizard_progress_page_widget.py", line 66, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\migration_schema_selection.py", line 150, in task_connect
    if not self.main.plan.migrationSource.connect():
  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\migration.py", line 180, in 

Open in new window

0
A table was designed to have some custom fields which are defined as nvarchar(max).  The problem is that the date being entered in that field are either entered as DD/MM/YYYYY or MM/DD/YYYY.

I need to select from the table but need the date in MM/DD/YYYY format.  

I tried using CONVERT(VARCHAR, date, 101) but it is still leaving values as DD/MM/YYYY.

I also tried to convert as date first before converting to the 101 code but receive an error - The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.

How do I convert the date?
0
Will your db performance match your db growth?
LVL 3
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Hi all,

I have a query where I'm trying to return the top 10 values in the query. I accept that if my I have equal values in my sort field that I'll get multiple of that value. Here's my SQL Statement:

SELECT TOP 10 qryDRGReviewDRGChangedTotals_10.SumOfDRGChangedCount, qryDRGReviewDRGChangedTotals_10.HospitalID, qryDRGReviewDRGChangedTotals_10.ParentClientID, qryDRGReviewDRGChangedTotals_10.Hospital, qryDRGReviewDRGChangedTotals_10.ParentClient, qryDRGReviewDRGChangedTotals_10.ReviewDateFrom, qryDRGReviewDRGChangedTotals_10.ReviewDateTo, qryDRGReviewDRGChangedTotals_10.ReviewDateRange, qryDRGReviewDRGChangedTotals_10.FilterText, qryDRGReviewDRGChangedTotals_10.HospitalShortName, qryDRGReviewDRGChangedTotals_10.OrgDRGID
FROM qryDRGReviewDRGChangedTotals_10
ORDER BY qryDRGReviewDRGChangedTotals_10.SumOfDRGChangedCount DESC;

Open in new window



As you can see the column  qryDRGReviewDRGChangedTotals_10.SumOfDRGChangedCount is the only column sorted and it's sorted in DESC order. And I'm asking for the top 10 values. But here's the result I get:



Here's the thing. there are MORE numbers below the 7 grouping.   There are 6's, 5's, 4's and so on. Why are they not showing up??? PLUS it's showing 11 rows. Why???

Any help would be greatly appreciated.

E
0
I have three SQL *.bak - backup files in a SQL backup folder, with the following dates, and I only want to delete one of  the oldest specific files which is the oldest.  

How can I configure the "SQL Maintenance Cleanup task : to do just this.

These are the files :

SQLsample1.bak   9/11/17
SQLsample2.bak   8/8/17
SQLsample3.bak   7/13/17 - This is the only file I want to delete because its the oldest.
0
I am creating a program with Android and SQLite. I have two tables in SQLite. One table is called notes, another one is called note_category.

Here are the queries used to create the tables:

CREATE TABLE note_category (
"category_id" INTEGER PRIMARY KEY AUTOINCREMENT,
 "category_name" TEXT,
);

CREATE TABLE notes (
 "note_id" INTEGER PRIMARY KEY AUTOINCREMENT,
 "category_id" INTEGER,
 "note_description" TEXT,
 FOREIGN KEY("category_id") REFERENCES note_category("category_id"));

Here aremy constructor, and database initializer methods:

 public NoteDBHandler(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
        this.context = context;
        SQLiteDatabase db = this.getWritableDatabase();
        dbPath = db.getPath();
        android.util.Log.d(this.getClass().getSimpleName(),"dbpath: "+dbPath);
    }

    @Override // here I am trying to enable the foreign keys
    public void onOpen(SQLiteDatabase db) {
        db.execSQL("PRAGMA foreign_keys=ON");
    }

 @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("DROP TABLE IF EXISTS " + TABLE_NOTE_CATEGORY);
        db.execSQL(TABLE_NOTE_CATEGORY);
        db.execSQL("DROP TABLE IF EXISTS " + TABLE_NOTE);
        db.execSQL(TABLE_NOTE);
    }

I created some methods to retrieve the data from the tables and store them into arrayLists of objects:

  public List<Notes> getAllNotes() {
        // …
0
I am using Microsoft SQL Management Studio 2008 which is connecting to a SQL database of course.
There a backup that runs and puts *.bak files into a backup folder for storage.  I have the following questions.

1. Is it Ok to go into the SQL \ backup folder and manually delete the backup file - *.back ??
             Will this manual delete hurt the database. ?

2. Is there another way of deleting SQL backup files. ??
0
Hello,
I am getting a syntax error of 3075 for some SQL in VBA.

Here is what it says :
---------------------------
Error
---------------------------
Error 3075: Syntax error (missing operator) in query expression 'SKUs.SkuIDFROM SKUs INNER JOIN ReviseFixedPriceItemTemp ON SKUs.SkuID = ReviseFixedPriceItemTemp.SkuIdLongWHERE (((SKUs.SkuID)=[ReviseFixedPriceItemTemp].[SkuIdLong]))'. in Mod_ReviseBulkFixedPriceItem
---------------------------
OK  
---------------------------



What I have in my VBA is:
sSQL = "SELECT SKUs.*, SKUs.SkuID" _
& "FROM SKUs INNER JOIN ReviseFixedPriceItemTemp ON SKUs.SkuID = ReviseFixedPriceItemTemp.SkuIdLong" _
& "WHERE (((SKUs.SkuID)=[ReviseFixedPriceItemTemp].[SkuIdLong]));"

Open in new window



But when I use the same SQL in a query it works great:
SELECT SKUs.*, SKUs.SkuID
FROM SKUs INNER JOIN ReviseFixedPriceItemTemp ON SKUs.SkuID = ReviseFixedPriceItemTemp.SkuIdLong
WHERE (((SKUs.SkuID)=[ReviseFixedPriceItemTemp].[SkuIdLong]));

Open in new window



I can't figure this one out and I know it is a simple solution but I can't see it. Thanks.
0
I have a table called table2
My table has fields called E7, E11, and E17
Some of the fields have values and some are blank.
How do I set up a query to update the blank fields to zero?
I don't know how to use SQL  but I do know how to use queries.
How do I set up the query to do this?
I have Access database 2013
0

SQL

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.