SQL ODBC Table Listing Is Not Showing
Nov 8, 2006
I have created a System DSN using the SQL Server ODBC driver and configured it to point to my server and database.
When I access the newly created DSN, it should show the tables listing. However, I get the following screen:
See it here
Why am I getting this instead of the tables listing and how do I fix it?
Thank you!
View 6 Replies
ADVERTISEMENT
Jun 17, 2008
I can find out the data types used in my table by navigating the SSMS and right clicking the table and selecting modify.
How do I view that same output using T-SQL?
Thank you
Goldmember
View 1 Replies
View Related
Oct 2, 2006
declare @MinVoter varchar(20)
declare @field varchar(20)
declare @sql1 varchar(100)
declare @tableName varchar(20)
set @tableName = '00221'
print @tableName
print '======================================='
select @field = ad_str1
from @tableName
where id_voter = @MinVoter
Server: Msg 137, Level 15, State 2, Line 15
Must declare the variable '@tableName'.
can someone fix this syntax.
View 20 Replies
View Related
Jun 10, 2008
Hi guys,
The below query should produce all those customers who are in 'orginalerrorfiles' but not in 'hopefullyworks2'. 3 fields will be used as the check to make sure that the rows, that r identical won't be displayed but those that r different will be displayed.
Instead of doing that it just display everything in the table called 'orginalerrorfiles'.
Note 'orginalerrorfiles' consist of 141455 rows
'hopefullyworks2' consist of 134784 rows
select o.card_no
,o.ref_no
,o.tran_val
from OriginalErrorFiles o
where exists (select h.card_no
,h.ref_no
,h.tran_val
from hopefullyworks2 h
where( h.card_no = o.card_no and
h.ref_no=o.ref_no and
h.tran_val = o.tran_val
))
View 5 Replies
View Related
Jan 16, 2008
I have a ##table (dynamic openquery to oracle - don't ask) but am unable to see the dataset schema in the dataset window
I've tried putting FMTONLY statements in - no difference
I've also tried changing the query to be text e.g. EXEC proc @param,..... - no difference
Anyone know of a workaround?
View 3 Replies
View Related
Nov 20, 2000
I have just installed SQL Server 7 on a server. Everything was installed fine without any errors. The only problem occurs when I use Enterprise Manager, I right click on a table in the Northwinds database to open table and return all rows. The form pops up and no rows appear. Nothing in the table form works. I can view the records from Query Analyzer, and can also view them through Enterprise Manager when using a workstation client. This problem only occurs at the server. Any thoughts.
View 1 Replies
View Related
Nov 23, 2006
Hi
i have a table inwhich there are three columns heading1, heading2, heading3...now this table is linked to a tree table which has columns headingid, headingname, and parentid
The link between the table1 and table 2 be
heading1 = headingid OR
heading2= headingid OR
heading3= headingid
is there a way I can show this on my database diagram??? (I know this is against normalisation, but the database was written by someone else...)
View 4 Replies
View Related
Dec 1, 2000
Does anyone know where I can get a digram showing the database schemas for all of the system database. I need to know the realtionship between tables in the system databases. Would like to download something from the internet preferably, or if someone has something they can e-mail?
View 1 Replies
View Related
Dec 10, 2007
Hi Madhu,
my table does not have primary key so i created a seperate index on each of the table.
I used the recommended tablediff utility and it works successfully. But its only show the difference of records in each table and does not copy rows from source to destination and destination to source table. I was expecting database1.dbo.table1 contains same records as in database1.dbo.table2.
C:Program FilesMicrosoft SQL Server90COM>tablediff /sourceserver kashif-pcs
qlexpress /sourcedatabase AB /sourcetable table1 /destinationserver kashif-pcsq
lexpress /destinationdatabase CD /destinationtable table2
Microsoft (R) SQL Server Replication Diff Tool
Copyright (C) 1988-2005 Microsoft Corporation. All rights reserved.
User-specified agent parameter values:
/sourceserver kashif-pcsqlexpress
/sourcedatabase AB
/sourcetable table1
/destinationserver kashif-pcsqlexpress
/destinationdatabase CD
/destinationtable table2
Table [AB].[dbo].[table1] on kashif-pcsqlexpress and Table [CD].[dbo].[table2]
on kashif-pcsqlexpress have 5 differences.
Err Sno
Src. Only 101
Src. Only 102
Dest. Only 103
Dest. Only 104
Dest. Only 105
The requested operation took 0.466767 seconds.
Can you write a short script for my problem, just like comparison of database1.dbo.table1 compares in database2.dbo.table2 and which ever records not present it should copy those and vice-versa.
It means Database1.dbo.table1 contains 5 records
Database2.dbo.table2 contains 5 records
Regards
Kashif Chotu
View 3 Replies
View Related
Mar 9, 2006
Hi fellas.
I need you to answer a question:
What should I do and which SQL Server tool do I have to use in order to find a job listing on the database ?
Thanks in advance,
Abrahão.
View 2 Replies
View Related
Aug 16, 2006
Hi,
I am traing to execute this select
SELECT count(*) CM_CERT_VARIANCE_DET_APINV_RELATE
using SQL SERVER ODBC, however, I received this message:
"Identifer too long"
Is there any table length name limitation?
I think, there is, because works well on SQL environment.
I mean, should this table have less then 18 characters? Can I work around this limitation?
cheers,
Alessandro
View 6 Replies
View Related
Dec 2, 2004
I am trying to get the following code to work but I keep getting an error.
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__titleauth__title__060DEAE8'. The conflict occurred in database 'pubs', table 'titleauthor', column 'title_id'.
Has anyone else experienced a problem with this example? Let me know what is wrong
with it.
Thanks,
Ralph
<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
Sub Page_Load
Dim dstPubs As DataSet
Dim conPubs As SqlConnection
Dim dadTitles As SqlDataAdapter
Dim dtblTitles As DataTable
Dim drowTitle As DataRow
Dim objCommandBuilder As New SqlCommandBuilder
' Grab Titles Table
dstPubs = New DataSet()
conPubs = New SqlConnection( "Server='(local)';Database=Pubs;trusted_connection=true" )
dadTitles = New SqlDataAdapter( "Select * from Titles", conPubs )
dadTitles.Fill( dstPubs, "Titles" )
dtblTitles = dstPubs.Tables( "Titles" )
' Display Original Titles Table
dgrdOriginalTitles.DataSource = dstPubs
dgrdOriginalTitles.DataBind()
' Add a Row
drowTitle = dtblTitles.NewRow()
drowTitle( "Title_id" ) = "xxxx"
drowTitle( "Title" ) = "ASP.NET Unleashed"
drowTitle( "Price" ) = 1200.00
drowTitle( "Type" ) = "Mystery"
drowTitle( "PubDate" ) = #12/25/1966#
dtblTitles.Rows.Add( drowTitle )
' Delete the First Row
dtblTitles.Rows( 0 ).Delete()
' Double the price of the Second Row
drowTitle = dtblTitles.Rows( 2 )
drowTitle( "Price" ) *= 2
' Generate the SQL Commands
objCommandBuilder = New SqlCommandBuilder( dadTitles )
' Update Titles Table
dadTitles.Update( dstPubs, "Titles" )
' Display New Titles Table
dgrdNewTitles.DataSource = dstPubs
dgrdNewTitles.DataBind()
End Sub
</script>
<html>
<head>
<title>UpdateDataSet</title>
</head>
<body>
<h2>Original Titles Table
</h2>
<asp:DataGrid id="dgrdOriginalTitles" Runat="Server"></asp:DataGrid>
<h2>New Titles Table
</h2>
<asp:DataGrid id="dgrdNewTitles" Runat="Server"></asp:DataGrid>
</body>
</html>
View 2 Replies
View Related
May 31, 2001
Is there a way to list all table index in a user database? Not the system index.
View 2 Replies
View Related
Aug 28, 2003
I want something like:
select TableName, IndexName
from SomeSystemTables
where TableName like 'Src%'
and IndexName not like '_WA%'
I plan on using this in a cursor in order to delete all indexes. Then I rebuild all tables from an old VMS.Ingres database and create new indexes.
I've looked over previous posts on listing indexes, but don't get the method for identifying both the tablename and the indexname in the same query. DB is SQL2000.
Thanks,
Al
View 2 Replies
View Related
Mar 21, 2001
Does anyone know of a system stored procedure that I can run to print a list of indexes for a specific datbase. I know I can do it for a specified table, but I would like it for all tables. Thanks!
View 4 Replies
View Related
Mar 12, 2004
Hi, I want to make a logfile where i store all tables, collnames and values of a specified database. Which statement can I use in SQLserver or Oracle? I already found the following statements:
Oracle:
select * from all_tables
select * from user_tables
SQLserver:
select * from sysobjects where type'='U'
So getting the tablenames isn't the problem. The question is how the get the matching columns with their type and value.
Tnx.
View 2 Replies
View Related
Jan 22, 2007
I have a query that lists the names of all employees and the number of training modules they have sat. The query is below:
SELECT distinct pps_principals.name AS principals_name,
COUNT(*) AS coursecount
FROM (PPS_SCOS JOIN PPS_TRANSCRIPTS ON PPS_SCOS.SCO_ID = PPS_TRANSCRIPTS.SCO_ID)
JOIN PPS_PRINCIPALS ON PPS_TRANSCRIPTS.PRINCIPAL_ID = PPS_PRINCIPALS.PRINCIPAL_ID AND PPS_TRANSCRIPTS.STATUS like '[PCF]'
AND PPS_TRANSCRIPTS.TICKET not like 'l-%'
and pps_scos.name like 'MT%'
and pps_principals.login like '%testlogin%'
and pps_transcripts.date_created between '2006-10-01' and '2007-09-30'
GROUP BY pps_principals.name
ORDER BY coursecount desc
The cont goes all the way down to those who have sat 1 module.
I now however need to be able to report all those names of individuals who have sat 0 courses.
Any help appreciated.
View 4 Replies
View Related
Mar 30, 2008
sample Table and records.
id uname punchdate punchtime
1 Â A Â Â Â Â 1/1/2007Â Â 7:00am
1 Â A Â Â Â Â 1/2/2007Â Â 8:00am
1 Â A Â Â Â Â 1/4/2007Â Â 7:30am
1 Â A Â Â Â Â 1/6/2007Â Â 7:40am
let say i want to get a result which punchdate is from 1/1/2007 to 1/8/2007, how can i get a result like this one.?
1 Â Â AÂ Â 1/1/2007 Â Â 7:00am
1 Â Â AÂ Â 1/2/2007 Â Â 8:00am
1 Â Â AÂ Â 1/3/2007 Â Â <null>
1 Â Â AÂ Â 1/4/2007 Â Â 7:30am
1 Â Â A Â Â 1/5/2007 Â Â <null>
1 Â Â A Â Â 1/6/2007 Â Â 7:40am
1 Â Â A Â Â 1/7/2007Â Â <null>
1 Â Â A Â Â 1/8/2007 Â Â <null>
listing all data even if theres no punchdate and time in the table.
View 2 Replies
View Related
Jul 20, 2005
Still using SQL7.I am wondering how come there is not an Information_Schema view thatlists indexes? Information_Schema is supposed to be the safest way toobtain information on metadata, but it appears that the only way toget a list of indexes is with a system stored proc.
View 1 Replies
View Related
Nov 14, 2003
is it possible to link a table with odbc into sql server?
it would be nice to link an MS Access table into sql server where i could use stored procedures to access the MS Access table.
View 1 Replies
View Related
May 12, 2006
Hi all,
I'm trying to copy a table from an odbc db to an sqlserver2005 db. SSIS will not do this for me and says I must write a script. I'm not experienced enough in sqlserver to do this and was unable to find a example of this by searching the web. Does anyone know of any websites with an explanation of how to do this?
thanks for any help.
View 5 Replies
View Related
Jan 25, 2001
Hello Experts,
I copied a database from my production server to the development server and now i dont see the users in the database from the enterprise manager,database and users folder. But, When i run a query to against the sysuser table from a query analyser I can see those users here. Why cant I see in from the Enterprise manager. Any advice please..
Appreciated any comments on this.
Thanks,
Vilke.
View 2 Replies
View Related
Jun 15, 2005
I have written the following query which returns the number of orders received grouped by the year and month:
SELECT DATEPART(yyyy, order_placeddate) AS year, DATEPART(mm, order_placeddate) AS month, count(order_id) AS orders
FROM orders
GROUP BY DATEPART(yyyy, order_placeddate), DATEPART(mm, order_placeddate)
ORDER BY year, month
year month orders
---- ----- ------
2004 6 17
2004 7 37
2004 8 30
2004 9 42
2004 10 34
2004 11 46
2005 1 25
2005 2 7
2005 4 1
The obvious problem with the above is that it misses out the months that have no orders, i.e. December, March, May, etc.
Is there a way I can amend my query so that it shows all months regardless of whether any orders were placed?
I have thought about trying to LEFT OUTER JOIN the above to a table that has rows with values of 1 – 12, but I’m not convinced this is the answer... and I don’t really know how to do it!
Do let me know if any of the above is unclear – what I’m after is the following:
year month orders
---- ----- ------
2004 6 17
2004 7 37
2004 8 30
2004 9 42
2004 10 34
2004 11 46
2004 12 0
2005 1 25
2005 2 7
2005 3 0
2005 4 1
2005 5 0
Many thanks
View 1 Replies
View Related
Jun 24, 2004
Is it possible to list all the tables in a database? I need to list the tablenames, is that possible with a .mdb database?
Only by using SQL, I want no frontend programming.
And is it possible to list all fieldnames of a known table.
All help appreciated
Lethean
View 9 Replies
View Related
Jun 14, 2006
Hey all. I apologize, but I'm a developer, not a DBA. I need to run a query that will list each table in a DB as well as the columns i nthose tables.
I know that you can use: EXEC sp_help 'table_name' to get a description, but I'm not sure how to set up a cursor to substitute the table names, or where to get the tables names.
Any help would be greatly appreciated. Thanks!
View 2 Replies
View Related
Apr 25, 2012
I'm suppose to List all orders where there is no shippedDate (just give their orderNumbers).
I have this:
select orderNumber from orders where shippedDate= null;
I'm not sure what to put in place of the "= null" as that is clearly wrong
(Note: If I use "select orderNumber from orders where shippedDate;" it prints out all the orders, but I only want the orders where there are no ShippedDate...
View 3 Replies
View Related
May 23, 2007
Working with sql server 2005. Is there a way through Management Studio to show all indexes within a db?
thanks.
View 2 Replies
View Related
Oct 25, 2005
I'm having trouble with an ODBC User that can't connect to 2003Windows Server with SQL2000.The ODBC fails when he tries to contact with TCP client connection.When I view the Network Connection it is displaying TCP is checked,but when I view the error log is doesn't display that it is listeningfor TCP.Is there any way to prove that my TCP connections are workingcorrectly or a way to make sure that my SQL server is listening forTCP?Thanks for reading my note and any help with this issue is greatlyappreciated.
View 2 Replies
View Related
Sep 21, 2006
I have 100s of packages under one project and finding it difficult to locate a package since it is not in any order. Is there a way to list packages by its name - alphabetically sort ?
Thanks
View 3 Replies
View Related
Dec 12, 2007
If I run the following code (quote many times on the internet), which should show all foreign keys in a database, but it only returns a partial list:
select CCU.table_name src_table, CCU.constraint_name src_constraint, CCU.column_name src_col, KCU.table_name target_table, KCU.column_name target_col, RC.UPDATE_RULE, RC.DELETE_RULE
from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE CCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC, INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU
where CCU.constraint_name = RC.constraint_name and RC.UNIQUE_CONSTRAINT_NAME = KCU.CONSTRAINT_NAME
order by CCU.table_name, CCU.constraint_name
If I run the following, removing the KEY_COLUMN_USAGE link, it returns the full list:
select CCU.table_name src_table, CCU.constraint_name src_constraint, CCU.column_name src_col, RC.UNIQUE_CONSTRAINT_NAME, RC.CONSTRAINT_NAME, RC.UPDATE_RULE, RC.DELETE_RULE
from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE CCU, INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC
where CCU.constraint_name = RC.constraint_name
order by CCU.table_name, CCU.constraint_name
I can't figure out what the problem is, the ones that are being left out of the first query ad the ones where the unique_constraint is set to the column name, not the constraint's name. For example, the first one appears in both query results, the second one only appears in the secod queries results:
src_table src_constraint src_col UNIQUE_CONSTRAINT_NAME CONSTRAINT_NAME UPDATE_RULE DELETE_RULE
awards awards_FK00 award_type aaaaaaward_types_PK awards_FK00 NO ACTION NO ACTION
awards awards_FK01 personid personid awards_FK01 NO ACTION CASCADE
Any help would be great, thank!
Michael
View 6 Replies
View Related
Feb 6, 2008
Hi All,
I have installed SQL Server Express on several machines on my network using same command line, configuring remote connections to be allowed. I have also added SQL Server and SQL Browser to the exceptions list in Windows Firewall.
All the installed intances in the network are listed when using SMO enumeration to browse through the servers.
But, in one of the machines, only the local SQL Express Instance is listed. The same is the case when trying from SQL Server Management Studio. But when I manually type the remote instance name it successfully connects.
I also found that adding SQL Management Studio to the list of exceptions in the Firewall solves the problem. But I don't want to install Management Studio in my client machines.
Any alternate solution will be helpful
View 1 Replies
View Related
Jun 9, 2005
Is there a list of all the SSIS Error codes and what they
View 15 Replies
View Related
Sep 27, 2006
I have access97 front end , with linked tables to sql server 2005. when i change a table ID column (type int) to primary key so it is updatable, then try open the table i get odbc error with no msg, if i alter table again to remove primary key option table opens fine but is not updateable. any ideas would be a great help
View 5 Replies
View Related