Currently viewing the tag: "statement"

Oracle SQL Video Tutorial: SELECT Statement . In This video we explained how to use select statement. “oracle as” “what is oracle” “sql and pl sql” “pl sql pl sql” “pl sql &” “& pl sql” “pl sql and” “pl sql and sql” “oracle to sql” “to sql oracle” “sql to oracle” “oracle 10g” “oracle 11g”…

Tagged with:
 

When it comes to data manipulation there is only so much you can do. Most of the options on data manipulation stem from three sources: 1. Field Manipulation (the likes of case statements, if statements etc..) 2. Join Manipulation (obtaining details by linking to other tables) 3. Unions (the purpose of this video ;o)) Unions allow you to “abut” two seperate data sources and place them in one datasource. This is not for the likes of customers and orders but rather the ability to have customers and employees in the same datasource. A good example of this is if you want an address list, both tables of customers and employees house disperate data but in the confines of a address list they are in most repsects the same. So this short and sweet video explains the “Union” and “Union All” statements to allow you to fully understand the differences. Enjoy!

In SQL Server there are four databases that you may never use but are equally as important as your databases you work on day in day out. These “System” databases are a fundamental concept to understand and will take a long time to master. In the case of this video I will give you a run down of what each one does (albiet quickly) so you have a general understanding of what they do and why they need to be backed up. Although it can be considered a boring part of SQL it is stil vital. So have your coffee ready and follow me!

Tagged with:
 

Use code to create an if-then statement in Excel VBA by using corresponding worksheet cells. Use an if-then statement in Excel VBA with tips from a software developer in this free video on using Microsoft Excel. Expert: Dave Andrews Contact: www.daveandrews.org Bio: Dave Andrews is a software developer that holds a degree in computer science. Currently, he is employed by a government IT department. Filmmaker: Tim Brown

When using SQL Management Studio, data can be entered by opening a table and entering data into a text field. Use SQL Management Studio to enter data, and remember to save changes, with tips from a software developer in this free video on Microsoft SQL Management Studio. Expert: Dave Andrews Contact: www.daveandrews.org Bio: Dave Andrews is a software developer that holds a degree in computer science. Currently, he is employed by a government IT department. Filmmaker: Tim Brown

Tagged with:
 

by avlxyz

Question: How to import SQLServer create table statement to Access?
Hello I have file “.sql” which I believe is a sql statement for sql server

Some sql command from file

/****** Object: Table [dbo].[tbl2Down] Script Date: 12/1/2544 17:52:38 ******/
CREATE TABLE [dbo].[tbl2Down] (
[num] [varchar] (2) NOT NULL ,
[value] [money] NULL ,
[seang] [money] NULL ,
[day] [varchar] (10) NOT NULL ,
[sell] [money] NULL
) ON [PRIMARY]
GO

/****** Object: Table [dbo].[tbl2Up] Script Date: 12/1/2544 17:52:38 ******/
CREATE TABLE [dbo].[tbl2Up] (
[num] [varchar] (2) NOT NULL ,
[value] [money] NULL ,
[seang] [money] NULL ,
[day] [varchar] (10) NOT NULL ,
[sell] [money] NULL
) ON [PRIMARY]
GO

How I can import .sql to microsoft access

Thank you

Answer:

Answer by Charles R
Access uses VB data types for instance varchar would be type text. In Access it is usually easier to create a table in design view. If you want to mix SQL Server and Access look into Data Projects or ADP. This lets you use Access as a front end and SQL Server as a backend.

Tagged with:
 

Question: I am having a problem with an insert statement in Visual Basic 8 connecting to an Access Database.?
Getting syntax error in INSERT TO statement. That is all the information I get. Here is my code. Parameters are set after last statement

Dim Cmd As OleDb.OleDbCommand
Dim Con As OleDb.OleDbConnection
Dim Sql As String = Nothing
Con = New OleDb.OleDbConnection(“Provider=Microsoft.Jet.OleDb.4.0;data source=” & “C:\Documents and Settings\MPAXTON1\My Documents\Visual Studio 2008\Projects\GunLog\GunLog\TeklogixReturnLog.mdb” & “”)
Sql = “INSERT INTO GunLog(date, sc_num, wh_id, gun, model, send_tek, sendRMA, return_tek, returnRMA, problem, employee, call_tek, tek_assoc, tek_sc) VALUES (@date, @sc_num, @wh_id, @gun, @model, @send_tek, @sendRMA, @return_tek, @returnRMA, @problem, @employee, @call_tek, @tek_assoc, @tek_sc)”
Cmd = New OleDb.OleDbCommand(Sql, Con)
I tried the single quotes and got the same message. :-(

Answer:

Answer by aryaxt
I think your problem is that you are not concidering the diference between numeric and string
try this
if the column is string have single qutes aroud the item for example
‘{0}’
Sql = String.Format(“INSERT INTO GunLog(date, sc_num, wh_id, gun, model, send_tek, sendRMA, return_tek, returnRMA, problem, employee, call_tek, tek_assoc, tek_sc)
VALUES ({0} , {1} , {2} , {3} , {4} , {5} , {6} , {7} , {8} , {9} , {10} , {11}, {12} , {13} ) “,
date, sc_num, wh_id, gun, model, send_tek, sendRMA, return_tek, returnRMA, problem, employee, call_tek, tek_assoc, tek_sc )

Tagged with:
 

How to load new data into your Oracle database by using the SQL INSERT statement. For more Oracle tutorials go to www.asktheoracle.net

In this Video Michael Corey, CEO & Founder of Ntirety – Database Administration As A Service ® talks about the 3 ways companies can deal with the challenges concerning Oracle, MySQL and Microsoft SQL Server Database Administration challenges

Tagged with:
 

Learn how to delete records from tables in your Oracle database and how to make sure you delete only the records you want to delete. For more Oracle tutorials go to www.asktheoracle.net

SQL Developer Tutorial that demonstrates how to retrieve all the data from a table, and specific columns from a table. Presented by www.oraclecoach.com

Tagged with:
 

Question: Visual Basic.NET Syntax error in INSERT INTO statement?
Alright, so I keep getting this error every time I try to add a record to an access database. I’ve checked all of my columns and everything I could think of but I do not believe any of them are reserved by access.

What I’m asking is either what exactly is the problem here and/or how do I view the INSERT INTO statement. The error occurs during run time. When the program crashes it says “OleDBException was unhandled” and the syntax error above. Here is the code:

Public Class Form1
Dim inc As Integer
Dim MaxRows As Integer
Dim con As New OleDb.OleDbConnection
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = “PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = FWDatabase.mdb”
con.Open()
sql = “SELECT * FROM tblClients”
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, “AddressBook”)
con.Close()
MaxRows = ds.Tables(“AddressBook”).Rows.Count
inc = 0
NavigateRecords()
End Sub

Private Sub NavigateRecords()
txtFirstName.Text = ds.Tables(“AddressBook”).Rows(inc).Item(1)
txtSurname.Text = ds.Tables(“AddressBook”).Rows(inc).Item(2)
End Sub

Private Sub btnCommit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCommit.Click
If inc <> -1 Then
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables(“AddressBook”).NewRow()
dsNewRow.Item(1) = txtFirstName.Text
dsNewRow.Item(2) = Date.Now
ds.Tables(“AddressBook”).Rows.Add(dsNewRow)
da.Update(ds, “AddressBook”)
MsgBox(“New Record added to Database”)
btnCommit.Enabled = False
btnAddNew.Enabled = True
btnUpdate.Enabled = True
btnDelete.Enabled = True
End If
End Sub
End Class
Well
Microsoft.Jet.OLEDB.4.0 works with another database that I have just fine, even adding records. If not then what should I change it to? I am running Vista btw.

Answer:

Answer by JackSSL
try to start changing the provider(if you are running this app under Vista or windows 7 Microsoft.Jet.OLEDB.4.0 will not work).


i’m sorry by say that, my mistake: MsJet Version 4 still works under Vista O.S., so, i don’t know where is the error in your code.
Anyway, see this link:

http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

For Windows7(i’m not sure about Vista) you must have the Microsoft.ACE.OLEDB.12.0 Provider, you may try downloading it from your computer and install

[]‘s

Tagged with: