I link to a sql server for the first time.
I change my .provider and .connectionstring to ADO
And know in one of my forms i get a debug Error; Invalid table Name "tablename"
can someone help me with this.
Thanks eddied
How can I get the script of a table.i.e 'CREATE TABLE' script. 1. One way is to get this script from SQL Analyzer. but I m having tables created in the database and I want the My Stored Procedure should build the script and return it to me ...
When an end user view a report using report manager or a custom build web site, would query of the report scan the tables in original data base? In this case it is a OLTP data base.
I cannot figure out how to print the design of a tabel. What I need is to have printed on a paper the list of the columns, data type, length, allow nulls and description for a table. thx
Ik wil uit een tabel het gehele getal halen, de waarde staat als05612123 maar wanneer ik ditopvraag in bv. de Query Analyzer wordt de waarde gegeven als 5612123.De 0 welke ervoor staat wordtdus niet afgebeeld. De tabel in de kolom heeft als Data Type char, deLength staat op 10 en Allow Nulls staat aangevinkt. Wie kan mij helpen?Dank.
Hi, I'm fairly new to strored procedures. what I need to do is create a new row with an INSERT specifying value A as a param ( so far no problem ) and value B as a value from table2. Is this possible? Thanks for your help Raif
Hi Running on SQL Server2005 I have an tabel Match, TeamInGroup, Team, Group and Series.
Want following resutlt:
Tabell Lag S V O F TOTAL P Grupp A BK Örnen 2 2 0 0 30-10 4 Wåxnäs BC 3 2 0 1 35-25 4 BK Kaskad 2 1 0 1 20-20 2 BK Bågen 3 1 0 2 29-31 2 BK Glam 3 1 0 2 24-36 2 IFK Norrköping BF 3 1 0 2 22-38 2
Grupp B Uppsala BC 90 3 2 1 0 35-25 5 Ludvika BK 2 2 0 0 25-14 4 Sundbybergs IK F 3 1 1 1 34-26 3 LBK Hudik 3 1 0 2 23-36 2 Domnarvets BS 2 0 1 1 19-21 1 Örta IF 3 0 1 2 23-37 1
Grupp C Stureby BK 3 2 0 1 39-21 4 Tureberg IF 2 2 0 0 28-12 4 BK Stallis 3 2 0 1 28-31 4 BK Amiki 3 1 0 2 28-31 2 Djurgårdens IF 2 1 0 1 15-25 2 BK Brio 3 0 0 3 21-39 0
Tabel Match:
USE [Bowlingserier] GO /****** Object: Table [dbo].[Match] Script Date: 09/19/2007 17:25:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Match]( [MatchId] [int] NOT NULL, [Matchstart] [datetime] NULL, [LagIdHemma] [int] NOT NULL, [LagIdBorta] [int] NOT NULL, [Resultathemma] [int] NULL, [ResultatBorta] [int] NULL, CONSTRAINT [PK_Match_1] PRIMARY KEY CLUSTERED ( [MatchId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
GO ALTER TABLE [dbo].[Match] WITH CHECK ADD CONSTRAINT [FK_Match_Team] FOREIGN KEY([LagIdHemma]) REFERENCES [dbo].[Team] ([TeamId]) GO ALTER TABLE [dbo].[Match] CHECK CONSTRAINT [FK_Match_Team] GO ALTER TABLE [dbo].[Match] WITH CHECK ADD CONSTRAINT [FK_Match_TeamInGroup] FOREIGN KEY([LagIdHemma]) REFERENCES [dbo].[TeamInGroup] ([TeamId]) GO ALTER TABLE [dbo].[Match] CHECK CONSTRAINT [FK_Match_TeamInGroup]
Tabel Team:
USE [Bowlingserier] GO /****** Object: Table [dbo].[Team] Script Date: 09/19/2007 17:28:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Team]( [TeamId] [int] NOT NULL, [Name] [varchar](20) NOT NULL, [GroupId] [int] IDENTITY(1,1) NOT NULL, CONSTRAINT [PK_Team] PRIMARY KEY CLUSTERED ( [TeamId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
GO SET ANSI_PADDING OFF
Tabel TeamInGroup:
USE [Bowlingserier] GO /****** Object: Table [dbo].[TeamInGroup] Script Date: 09/19/2007 17:27:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TeamInGroup]( [TeamId] [int] NOT NULL, [GroupID] [int] NOT NULL, CONSTRAINT [PK_TeamInGroup_1] PRIMARY KEY CLUSTERED ( [TeamId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
GO ALTER TABLE [dbo].[TeamInGroup] WITH CHECK ADD CONSTRAINT [FK_TeamInGroup_Grupp] FOREIGN KEY([GroupID]) REFERENCES [dbo].[Grupp] ([GroupId]) GO ALTER TABLE [dbo].[TeamInGroup] CHECK CONSTRAINT [FK_TeamInGroup_Grupp]
Tabel Group:
USE [Bowlingserier] GO /****** Object: Table [dbo].[Grupp] Script Date: 09/19/2007 17:29:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Grupp]( [GroupId] [int] NOT NULL, [SeriesId] [int] NOT NULL, [Namn] [varchar](50) NULL, CONSTRAINT [PK_Grupp_1] PRIMARY KEY CLUSTERED ( [GroupId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
GO SET ANSI_PADDING OFF GO ALTER TABLE [dbo].[Grupp] WITH CHECK ADD CONSTRAINT [FK_Grupp_Serier] FOREIGN KEY([SeriesId]) REFERENCES [dbo].[Serier] ([SeriesId]) GO ALTER TABLE [dbo].[Grupp] CHECK CONSTRAINT [FK_Grupp_Serier]
Tabel Series
USE [Bowlingserier] GO /****** Object: Table [dbo].[Serier] Script Date: 09/19/2007 17:30:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Serier]( [SeriesId] [int] NOT NULL, CONSTRAINT [PK_Serier] PRIMARY KEY CLUSTERED ( [SeriesId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
This is what i dot so far:
SELECT tg.GroupID, t.Name, COUNT(m.ResultatHemma) AS S, CASE WHEN m.ResultatHemma - m.ResultatBorta > 0 THEN COUNT(m.ResultatHemma) ELSE 0 END AS V, CASE WHEN m.ResultatHemma - m.ResultatBorta = 0 THEN COUNT(m.ResultatHemma) ELSE 0 END AS O, CASE WHEN m.ResultatHemma - m.ResultatBorta < 0 THEN COUNT(m.ResultatHemma) ELSE 0 END AS F, SUM(m.ResultatHemma) AS Hemma, SUM(m.ResultatBorta) AS Borta, SUM(m.ResultatHemma - m.ResultatBorta) AS Diff,
CASE WHEN m.ResultatHemma - m.ResultatBorta = 0 THEN 1 ELSE CASE WHEN m.ResultatHemma - m.ResultatBorta > 0 THEN 2 ELSE 0 END END AS P FROM Match AS m INNER JOIN Team AS t ON m.LagIdHemma = t.TeamId INNER JOIN TeamInGroup AS tg ON m.LagIdHemma = tg.TeamId WHERE (m.MatchId = m.MatchId) AND (tg.GroupID = 2 OR tg.GroupID = 1 OR tg.GroupID = 3) GROUP BY t.Name, tg.GroupID, m.Resultathemma, m.Resultatborta ORDER BY P DESC, Diff DESC, S DESC
I can't figure out howto group by t.Name and team in Group A,B, and C
Team: TeamId Name GroupId ----------- -------------------- ----------- 30896 Sundbybergs IK F 2 31346 Turebergs IF 3 32186 Örta IF 2 33286 Domnarvets BS 2 33290 Ludvika BK 2 33407 BK Glam 1 33628 BK Amiki 3 33684 Stureby BK 3 33705 BK Brio 3 33722 BK Stallis 3 33737 Uppsala BC90 2 33744 BK Bågen 1 33768 Wåxnäs BC 1 33874 BK Kaskad 1 33894 BK Örnen 1 42031 LBK Hudik 2 43635 Djurgårdens IF 3 159120 IFK Norrköping 1
Group: GroupId SeriesId Namn ----------- ----------- -------------------------------------------------- 1 48967 Grupp A 2 48967 Grupp B 3 48967 Grupp C
(3 row(s) affected) And Serier: SeriesId ----------- 48967
I'm making a system to data acquisition (production) and need more (3) tabels with a heavy load of data.
3 tabels will contain approximately 20-50 milion rows. Every day I need to add 80000 rows to these tabels. Will I get problems with system-performance with such a configuration? Ofcourse the system will contain index in the database and 2 fast 1 Ghz intel CPU. I isn't possible for me to seperate or archive theese tabel, because of researc-functionality.
Hi i am trying to create an insert statement that will insert rows into a table based on the information in the table already. the table looks like this
INSERT Into table1(groupid,field1,field2) select -1,@passedvalue,field2 from table1 where field1 = @passedvalue1
assume @passedvalue = 700, @passwedvalue1 = 100 Now this is fine however i cannot have a duplicate key (key is comibantion of all 3 fields) thus the first time this runs it works however if it runs again it fails - how can i change the where clause to ignore rows that already exist? eg if @passedvalue = 300 and passedvalue1 = 500
I have flat file (comma delimited) with 200 columns, and i want to import this to sql table using SSIS package, I create a Flat file source and sql server destination items from tool box. in destination item, i can not see the preview, for some reason, it is not reading the rows from source, Do I have to manually each and every column from source to destination under mapping tabl in destination item.
I'm writing my first web site using VS 2005 and with my login page I'm trying to link with my SQL database using the following setting in my web.config file <appSettings> <add key="SQLDB" value="server=STEVE-LT; database=MasterDB; uid=sa pwd="/></appSettings> Then in my Login.aspx file I use the following code to access the SQL database Dim Sc As SqlConnection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("SQLDB"))Dim SqlCmd As SqlCommand = New SqlCommand("Select Password, Name from Login")SqlCmd.CommandType = CommandType.StoredProcedure Sc.Open()SqlCmd.Connection = Sc This raises the following error message A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) Could someone please tell me where I am going wrong. Thanks
I need to have database access via an application to both sql server 6.5 & 7 the 6.5 uses mixed mode security, the 7.0 uses trusted. Using sp_addlinkedsrvlogin I can get from a client to the 7.0 server, but not to the 6.5. Is this even possible?
I can't seem to link a 6.5 database from 7.0 and there's nothing in help which seems to help. Is it a "SQL Server" or do you have to use the OLE DB Provider? If the latter, what's supposed to be in the Product, Data Source, Provider String and Catalog fields? What about security? I've tried everything I can think of and can't get it to work. I also get errors creating a new DTS package that says "Could ot create Component Categories Manager", and then "Error during creation of DTS Package". I installed the desktop version of 7 on an NT Workstation. Has anyone successfully linked a 6.5 server in this environment?
select a.RecordID,a.RelocateID,a.WhenConfirmed,b.RequestI D,b.DocumentID,b.RequestWhen from RelocateeDTA a inner join docRequests b on ({a.RecordID}=' + CONVERT(VARCHAR, a.RecordID)'= b.WhereClause)
because I am trying to link RelocateeDTA that has RecordID to docRequests that has the same piece of data in field WhereClause but is a varchar, and I am getting an error message (syntax error or access violation)
Hello there, im new here and wanted some help, i would be very grateful to anyone that can help:
I am setting up a DSN for my website (www.t-f-l.com, it may make more sense if you visit the site) i need it so members can sign up to the site (for the exact problem, click 'sign up now' on the website
I have set up the DSN but it says i need to link it to the database tables via MS access, im not sure at all how to do this...please can someone help
please explain in real idiot language....as i am new to this
dear experts, i have two tables, tblcustomer and tblform. in tblcustomer i have cutomerid PK and i have also a field that link these two tables customername. in tblforms i have formname. customername and formname are not PK and customername has a lot of null values. my question is that i want to link these two tables in customerid not the name and also to get the forms used by this customer. the thing is that i have to write a join query. any suggestion to do that?
I am not a database manager, but I work with people that use databases for sales and customer service... so I am not too familiar with the code and lingo... please bear with me.
We use two databases - one is in SQL, and it is for pre-sales customer service... i.e. tracking notes, phone calls, emails, and opportunities. The second database is in Progress, and it is for actual quotes, tracking time, labor, materials, cost, and revenue. As of now, our sales people have to enter new customers in the SQL database, and then duplicate the information in the Progress database. It's very frustrating, because everything needs to be entered twice - name, address, phone, shipping info, etc. etc. etc... When we first started this - 10 years ago - we were told that it could all be linked.
So my question is - is it possible to link these databases together? When our sales people enter a new contact in CRM, I'd like it to be automatically entered into the Progress database. If they make a change to a phone number, I'd like that to be updated in the Progress database. Also the other way around - if a shipping address is changed in the Progress database, I'd like it updated automatically in the SQL database.
Please tell me this is possible - and easy!!! Thanks for any help you can provide at all.
Does Exchange 2000 and SQL 2000 have to be the same machine to use exoledb.dll? I want to link to an Exchange server and gain access to a Public Folder Contact Object for use as a lookup table within an Access front end. Someone directed me to use the Exchange OLE DB Provider, but it does not exist on my SQL machine.
I would like to use MVJ's formula for creating a date table.
I would like to use it with our main ERP database. However, I am reluctant to make changes to it because I fear that at some point when we upgrade that software and it's database that the upgrade program will delete my table.
So, here is my question. Performance wise, does it matter whether I add the date table to our ERP database or if I create another database (on the same server) for the custom date table? Does linking between databases take substantially longer than linking within the same database?
I know it's possible to link tables between Access and SQL Server using ODBC....however can u use DAO to do this? If there's a way i would appreciate some help. Thanks in advance.
We are considering to implement Microsoft CRM 3.0 in our (small) organization. But we already have some customer information in another system (Unit4). We want to duplicate this information to our new CRM-system. This data will be read-only in the CRM-application.
Both the applications are installed on different servers with their own SQL databases(server 2000 and server 2005)
How can we duplicate the customer information from the unit4-system to Microsoft CRM? Can we simply link those databases using ?ODBC? (I heard something about ODBC but don’t know what it really is.)
Could someone clearly explain me what we have to do to make a construction as described above. (you don't have to give me all details) Is this construction possible anyway?
I am have created a test table in enterprise manager v8 and linked this table to an access database. I am able to append to the table from access but cant delete or update.
Ive set the permission settings to allow the user to update and del so cant work out why this isnt working?
Two SQL Servers1) "Test"Payroll DBTransaction Tablepr_SubmitTransaction in Payroll DB********************************************2) "Production"Payroll DBTransaction TablePr_SubmitTransaction in Payroll DBAccounts DBPr_VerifyAccounts (@AcctNumber)********************************************I want to use same pr_VeriftAccounts in both test and productionPr_SubmitTransaction stored procedure.The pr_SubmitTransaction in production works fine when I sayExec Payroll.dbo.pr_VerifyAccounts as it is on same server. (WORKSFINE)Exec [PRODUCTION].Payroll.dbo.pr_VerifyAccounts (DOES NOT WORK)Should I use sp_addlinkedServer ?? to do this ?. Please provide me somefeedback.I know I can acheive this by front end, but I was do it in one storedprocedure.
Little puzzle this.I need to link from SQL2000 to Access to get to a table held within anAccess DB. Now you can link within Access to a SQL table, but can thisbe done the other way round ? It's the first time I've needed to dosomething like this.What I have is an application which was written (by me) with an Accessbackend (to run on a CD) and now it needs to run on SQL. However, Iwant to be able to swap over between backends so that I can choosewhere this runs from. I've done this with the sole exception of onetable. Previously most of the data was held in one MDB file and a linkto another (one local copy and one on CD). My queries use the link toquery both local and the CD copy data together.I can re-write things if I need to, but I was curious about there beinga way of doing this. What I want in effect is to query a view on SQL,but the data will be held in Access instead of on SQL.I suppose I can import as I need it as the data is purely read only. Idon't think this can be done, but wanted to check first. I can alwaysmove the remainder of the data over to SQL if needed. It's not a bigproblem, just something I'm curious about.Any pointers would be appreciated.Thanks in advanceRyanp.s. In case anyone wonders why I have taken this approach it isbecause we have a query tool and data that we send out to clients onCD. Some now want this web based, so I will publish the application ona Citrix server, and by changing a config file can swap within theapplication to point to SQL (by changing the ODBC settings). This way,I only need one copy of the application and can change backends as Ineed to.
I am trying to compile a simple ODBC and C example on Windows XP SP2.I have Cygwin_NT 5.1.This is the code (obtained fromhttp://www.easysoft.com/developer/l...#dm_fns_drivers)i am attempting to compile.ODBCTest.c
Hi, I am using sqlserver2005, when i make linked server connection between sqlserver2005 and oracle10g . It shows an error like that " Particular table doesnot exist or user doesn't have permission to connect ti this table"and below this one message is shown which is " Message 7314, line16".But i am giving it a proper "username/password ". In this linked server i am using Oracle10g new provider "ODAC101040.exe". so, please elaborate my such problem and also gives me the solution of this problem. Thanx regards gautam