Question

What SQL syntax would you use to change data in a table if you only had...

What SQL syntax would you use to change data in a table if you only had read access to the table? Having read access means the data manipulation would occur in the dataset rather than in the table being pulled from.

Homework Answers

Answer #1

Complete SQL statements can not be run on a dataset, but the datatable inside dataset does have a method called Select(string) which selects an array of DataRow object that match a certain criteria.

E.g. if I have a dataset named ds that contains data. This data has a table students with fields like firstname and lastname. Let's say I want to run a query to find students with lastname as 'johnson'.

The SQL syntax would be

DataTable tblStudents = dsView.Tables["STUDENTS"];
DataRow[] results = tblStudents.Select("lastname = 'johnson'");
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What SQL syntax would you use to change data in a table if you only had...
What SQL syntax would you use to change data in a table if you only had read access to the table? Having read access means the data manipulation would occur in the dataset rather than in the table being pulled from.
Using SQL syntax, what statement would you use to create an Employee table with the information...
Using SQL syntax, what statement would you use to create an Employee table with the information FirstName, LastName, and EmployeeID.
What SQL syntax could you use to filter date ranges in your dataset?
What SQL syntax could you use to filter date ranges in your dataset?
A Guide to SQL Questions 1. How do you create a table using SQL? 2. How...
A Guide to SQL Questions 1. How do you create a table using SQL? 2. How do you delete a table using SQL? 3. What are the common data types used to define columns using SQL? 4. Identify the best data type to use to store the following data in Oracle, in SQL Server, and in Access:    a. The month, day, and year that an employee was hired    b. An employee’s Social Security number    c. The department...
You query data from emp2 table with below SQL statement: SQL> SELECT *     FROM  emp2; NAME SSN...
You query data from emp2 table with below SQL statement: SQL> SELECT *     FROM  emp2; NAME SSN ------------- ------------------------ Joe 452852452 Mary 444525962 Fred 445212525 Tom 492525252 Lucy   172826152   Now, you query data from emp2 table with below SQL statement again: SQL> SELECT AVG(LENGTH(name)) AS column1, SUM(INSTR(ssn, '%@',2,2)) AS column2 FROM  emp2 WHERE name = INICAP(name); What will be displayed for the output of column1 and column2? A. The value in column1 will be 3.5 and the value in column2 will be...
SQL: Assume the table below was identified during a normalization activity. What command would I type...
SQL: Assume the table below was identified during a normalization activity. What command would I type to create this table -- assuming the 'TypeDesc' column was required? (i.e: not allowed to having missing values).   Assume that the possible Type Codes are H, C, W, M, P, S. (Don't worry about inserting the data. Make reasonable assumptions about the datatypes.) Table Name : Type TypCode TypeDesc H Home C Cell W Work M Mobile P Parent S Spouse
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table. SQL provides two different techniques for querying data from multiple tables: • The SQL subquery • The SQL join As you will learn, although both work with multiple tables, they are used for slightly different purposes. We used WMCRM database which is what we created in Lab 4. Here is the summary of the database schema (where schema is used in its meaning of...
If you had graph data (you have an image) how do you write it in a...
If you had graph data (you have an image) how do you write it in a program? I mean how do you represent it in a program? What structure would you use to write the graph? I mean how do you code it in a program for the computer to read the graph? A computer can’t read a drawing, so how do you code the program to read the graph? What structure would you use in a computer so the...
What critical value t* from the t-table would you use for a confidence interval for the...
What critical value t* from the t-table would you use for a confidence interval for the mean of the population in each of the following situations? NOTE: The critical value is just another name for the t* values we read off from the type of T Table you have in your notes. (Use 3 decimal places) (a) A 95% confidence interval based on 4 observations (b) A 99% confidence interval from an SRS of 9 observations (c) An 90% confidence...
would you use a frequency table or relative frequency table to generate data for patients seen...
would you use a frequency table or relative frequency table to generate data for patients seen in a doctors office and their wait time
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT