If you need to have a liste of tables starting with 'WI', under Oracle for example, with a simple select of a system view (with a filter : table_name like 'WI%') you have the result.
Under SQL Server, how to do this simply (sp_tables ?) ?
Hello, Maybe anyone have done that before? I have table where i store SOURCE_TABLE_NAME and DESTINATION_TABLE_NAME, there is about 120+ tables. i need make SSIS package which selects SOURCE_TABLE_NAME from source ole db, and loads it to DESTINATION_TABLE_NAME in destination ole db.
I made such SSIS package. set ole db source data access mode to table or view name variable. set ole db destination data access mode to table or view name variable. set to variables defoult values (names of existing tables) but when i loop table names is changed, it reports error, that can map columns, becouse in new tables is different columns.
Anybody know any method/script I can use to see a list of table name and table size (in bytes, not rows) within a database? I know I can see the size of any particular table in "Table info" tab or using "sp_spaceused" procedure. But I can't generate a report with a list of table name and table size using these methods. Any idea? Thanks.
I have a list of names, all i have to do is check to see if any of them are in a table, if they are they get deleted. The unique field of the table is title and it is what i have. I don't really know how i am meant to do this. I thought of creating a new table, placing my values into it and comparing to the already existing table, but surely their is a simple way?
Is there a system table that holds the table definitions, names, properties, etc. for tables that I have designed? I would like to write a transact SQL query to insert a field in every table that I have defined.
Hi! There must be a very simple answer to this question, but it’s my first venture into using SQL Server data.
I’ve set up an ASP.NET site to provide for on-line sign-up of events. The site has a masterpage and utilizes a wizard to create an e-mail to request sign-up for an event.
I’d like to make my radiobuttonlist dynamic so that events past the signup deadline will not be displayed. So, I’ve created a database table that includes two fields: event_description and event_date – such that the radiobuttonlist will only show those events that are at least three days beyond today’s date.
I’ve configured the data source and the radiobuttonlist so that I can display all the entries in the event table, but I can’t figure out how to restrict them to today + 3 events only.
I’m guessing my problem is in the “Add Where Clause� of the “Configure Data Source� wizard. I’m sure the “Column� should be set to event_date and the “Operator� should be set to “>�, but what should I set the “Source� & “Parameter Properties� to? I’ve set a variable in my program as “Dim deadline As Date = Today.AddDays(3)�, but the wizard doesn’t seem to see it.
Can anyone steer me in the right direction? Thanks, Jerry
Hi,I have table (tbl_a) that get it values form three Dropdown List and the PK of this table is FK in different table(tbl_b).Since tbl_a get its values from three Dropdown List the number of rows in this table is limited to the number of combinations the three Dropdown List is offer (in any case the number of raws in that table will be final).Assuming tbl_a and tbl_b are both empty. The problem is that if i want to insert row to tbl_b i have to check first if there is a row that holds the values (or combination of values) i am getting from the Dropdown List in tbl_a .Then, if such row is exist i have to get the PK of that raw and insert it to tbl_b (as FK),if such row does not exist, i have to insert it and then get the PK of this row and insert it to tbl_b (as FK). In the end, tbl_a will have all the combination the three Dropdown List can offer so checking if raw exist in this table will not be necessary. In my opinion this is not effective way to do that.Can someone offer me better way to do it? Thanks
Is there a query I can run to retrieve a list of all tables and their sizes in a database? I want something that is like the feature in Enterprise Manager when you click on a database and then the 'Tables & Index' link. It lists the tables and their respective size. I want to push this into a spread sheet.
The reason why I am doing this is the compare data between 2 different databases. Since I cannot find a tool that will compare the data, the closest I can get (without bcp-ing out all data and comparing) is to look at the sizes of each table.
We are listing available SQL databases for selection in a VB list box, but need to be able to then elicit the tables in the database for another list. I am sure it is something simple, could someone help me out with this? Thanks!! Laura
Hi, I have table (tbl_a) that get it values form three Dropdown List and the PK of this table is FK in different table(tbl_b). Since tbl_a get its values from three Dropdown List the number of rows in this table is limited to the number of combinations the three Dropdown List is offer (in any case the number of raws in that table will be final). Assuming tbl_a and tbl_b are both empty.
The problem is that if i want to insert row to tbl_b i have to check first if there is a row that holds the values (or combination of values) i am getting from the Dropdown List in tbl_a . Then, if such row is exist i have to get the PK of that raw and insert it to tbl_b (as FK), if such row does not exist, i have to insert it and then get the PK of this row and insert it to tbl_b (as FK).
In the end, tbl_a will have all the combination the three Dropdown List can offer so checking if raw exist in this table will not be necessary.
In my opinion this is not effective way to do that. Can someone offer me better way to do it?
My boss would like a list of all the tables in a specific database and their record counts. There are over 80 tables in this database, so doing one by one is not something I have time for. Does anyone know of a system table that stores this information or an easy way of doing this?
I use this macro to list in A column of sheet the name of sql server on my lan. Is possible to "scan server by server" and insert into column B the name of database and related table? Tks. Sub test_sql() Dim TEST As String Dim RIGA As String
I accidently deleted the file that I was working on in notepad that had the tables and views that I created. Is there a way to retrieve a list and the code that I put in for the tables and views?
Hi, I know sys.tables and sys.columns gives me a list of tables andcolumns in a SQL 2005 database.How can I list Columns in a specific Table please?Thanks in advance,Ronny
As the thread title state, I was wondering if it is possible to alternate the list table row colors between 2 colors. Just wanted to make it more presentable when viewing.
I'm having trouble generating an XML file from a sql table. Basically its an HR Dept. table that has departmentID and ParentDepartmentID. I need to create a hierarchal xml file that has a parent node, and all its departments, and if any of the sub departments have any below them, stick those departments in accordingly. I can do this two ways...either through tSQL or through .NET recursive methods. I've tried the recursion but can't wrap my head around it enough to get it working.
Here is the table schema:
Code BlockCREATE TABLE [dbo].[DepartmentTree]( [DepartmentID] [varchar](13) NOT NULL, [ParentDepartmentID] [varchar](13) NOT NULL, [Description] [varchar](30) NOT NULL, [ManagerEmployeeID] [varchar](13) NOT NULL ) ON [PRIMARY]
here is the xml markup I'm looking for (or facsimile thereof...doesnt really matter)
In SQL Server, is there a way to list all the data pages, index pages, IAM pages, etc. for a given user table? Like this: Â Data pages: (1, 200), (1, 201) Index pages: (1, 202) Â Or if that is impossible, then is it possible to list only the data pages for a table?