Creating A 2nd Schedule Table?
Dec 17, 2014
I have a table right now, that gives when an event was done in a date time (eg. Event done Jan 1, 2014, event 2 done Jan 2, 2014).
What is a feasible way to make a second table to join on this date time which provides the type of worker (eg. part time, full time, volumteer, etc) without making a table with every day, hour and minute as a separate row?
For example, a test was done on Jan 1, 2014 at 1pm, in table A. I was thinking my second table would list every date and time and fill in what type of worker was on at that minute/time. Then I would left outer join with my first table, so the end result would be Event A was done Jan 1, 1pm, therefore it was a: Volunteer worker. Event B was done Jan 1, 2pm, therefore it was a : Full time worker.
But I realize that it is not feasible to write a table with every date/time available to accommodate all the different types of shifts.
View 2 Replies
ADVERTISEMENT
Jun 7, 2015
Is it possible to create a SQL schedule task to execute after 5days from the 28th of every month.
View 3 Replies
View Related
Oct 10, 2006
Where can I find an english translation of the values in fields ReccurrenceType, State, Daysofweek, and Type in the Schedule table of the ReportServer database?
Example what does it mean when RecurrenceType is equal to 2, or equal to 4?
Thanks
View 5 Replies
View Related
Jun 9, 2008
I have an application that has a dropdown in which, I want a users most popular choices (from history) to be on top. This is easily done via a query however the query is too slow, after be optimized. I'd like to have create a table that contains each users most popular selection, and then just update it nightly. How can I schedule some SQL code to run nightly?
View 1 Replies
View Related
Apr 4, 2008
hi friends,
i have SSIS packages and i want them execure from table values...
table ETLJOBS
PackageID 1,2,3
Name
FrequencyOF Run 30,60,90 (Mint)
StartTime
EndTime
.....
....
how can i use table values and Execure Package.
here my package frequency can be change in future so i want to make my code generic.
thx for reading my question.
View 5 Replies
View Related
Jul 23, 2002
Hello all,
I hope someone can help me with a big problem... I'm using Citrix Resource Management Services with a SQL 2000 database. Their are 15 citrix servers which are all reporting to the SQL database.
The database is expanding very quickly and is becoming slower and slower.
My question is: I want to schedule a purge of old records on a friday afternoon, like this:
WEEK 1 - MON / FRI
WEEK 2 - MON / FRI (Friday's purge records week1)
WEEK 3 - MON / FRI (Friday's purge records week2)
etc...
Is this possible? if yes how do i do this !??!
Thank you very much for any info!!
Daan
View 1 Replies
View Related
Jan 28, 2008
Hi,
If I want to automatically insert a record which has default value in a table,
how can I create the trigger?
View 5 Replies
View Related
Jun 7, 2007
The only way the job success is if I select the option add rows wich is copying all rows even the ones that are already there, I tried to drop amd recreate the table option but i just dosn't run that way, help please..
View 1 Replies
View Related
Jun 24, 2007
I couldn't find any tutorials/articles on integrating a SharePoint web service call with an SSIS package
I need to schedule a web service to truncate and populate SharePoint Lists (2007 & 2003) from a SQL Server 2005 table.
I guess I'm just ignorant about integrating web services with SSIS. How do I make a call to the web service through my SSIS package? (script task?)
Any links to articles/tutorials or pointers would be apreciated.
View 3 Replies
View Related
Nov 29, 2006
Banti writes "IF i create temporary table by using #table and ##table then what is the difference. i found no difference.
pls reply.
first:
create table ##temp
(
name varchar(25),
roll int
)
insert into ##temp values('banti',1)
select * from ##temp
second:
create table #temp
(
name varchar(25),
roll int
)
insert into #temp values('banti',1)
select * from #temp
both works fine , then what is the difference
waiting for ur reply
Banti"
View 1 Replies
View Related
Jul 23, 2005
Using SQL against a DB2 table the 'with' key word is used todynamically create a temporary table with an SQL statement that isretained for the duration of that SQL statement.What is the equivalent to the SQL 'with' using TSQL? If there is notone, what is the TSQL solution to creating a temporary table that isassociated with an SQL statement? Examples would be appreciated.Thank you!!
View 11 Replies
View Related
May 20, 2006
I am trying to create a table that holds info about a user; with the usual columns for firstName, lastName, etc.... no problem creating the table or it's columns, but how can I "restrict" the values of my State column in the 'users' table so that it only accepts values from the 'states' table?
View 2 Replies
View Related
Aug 31, 2006
Hello all:
Is it possible to creates fields of the table dynamically?. I have this situation in my project. This is just a small sample. I have row of length 140. I don't wan't to declare all this fields manually using the create table command.
The description of table is as, in this table all the field are of type varchar only, there are like 140 columns.
create dummy emp (
field1 VARCHAR(100), field2 varchar(200), field3 VARCHAR(100).... )
Table: Dummy
================================================== ==
field1 field2 field3..........
Empid Empname empaage1 sam 23...........
2 rai 22............
.
.
.
n raj 45.............
================================================== ==
Now I want to create another table as "EMP" , with proper data type
fields too..
create table emp (
empid int, empname varchar(100), empage int....)
The table should look like as:
Table: EMP
================================================== ==
Empid Empname empaage............
1 sam 23...............
2 rai 22................
.
.
.
n raj 45.................
================================================== ==
I want to do this dynamically.....
Some how I need to extract those field from table[dummy]; the first row acts as a column header for the table[Emp] and the subsequent row acts as a record for the table[Emp]
A small rough snippet of the code will be appreciated....
Waiting for replies........
saby
View 1 Replies
View Related
Mar 19, 2012
I am using a Stored procedure in which I am creating a table and dropping that table at the end of execution. This SP is calling every 10 second (but no concurrent access) from my application. Is there any issue using the drop table command in the SP? will it create any memory fragmentation issue in SQL server?
View 7 Replies
View Related
Sep 20, 2007
I am attempting to create a stored procedure that will launch at report runtime to summarize data in a table into a table that will reflect period data using an array type field. I know how to execute one line but I am not sure how to run the script so that it not only summarizes the data below but also creates and drops the table.
Any help would be greatly appreciated.
Current Table
Project | Task | Category | Fiscal Year | Fiscal Month | Total Hours
---------------------------------------------------------------------------------------------------------
Proj 1 | Task 1 | Cat 1 | 2007 | 01 | 40
Proj 1 | Task 1 | Cat 2 | 2007 | 02 | 20
Proj 1 | Task 1 | Cat 3 | 2007 | 03 | 35
Proj 1 | Task 1 | Cat 1 | 2008 | 01 | 40
Proj 1 | Task 1 | Cat 2 | 2008 | 02 | 40
Proj 1 | Task 1 | Cat 3 | 2008 | 03 | 40
Proposed Table
Project | Task | Category | Fiscal Month 01 | Fiscal Month 02 | Fiscal Month 03 | Fiscal Year
---------------------------------------------------------------------------------------------------------------------------------------------------
Proj 1 | Task 1 | Cat 1 | 40 | 0 | 0 | 2007
Proj 1 | Task 1 | Cat 2 | 0 | 20 | 0 | 2007Proj 1 | Task 1 | Cat 3 | 0 | 0 | 35 | 2007
Proj 1 | Task 1 | Cat 1 | 40 | 0 | 0 | 2008
Proj 1 | Task 1 | Cat 2 | 0 | 40 | 0 | 2008
Proj 1 | Task 1 | Cat 3 | 0 | 0 | 40 | 2008
Thanks,
Mike Misera
View 6 Replies
View Related
Jan 13, 2005
Hi All,
I have a situation with a table that was created for a transactional
system with a 3 columns key. The table is similar to the following:
countrystatecitydescription
11221City A from country 1 and state 12
11321City A from country 1 and state 13
21422City B from country 2 and state 14
21522City B from country 2 and state 15
Now I'm trying to create a dts package that would allow me to build a
city dimension table with unique codes (keys) for each city. What kind of
transformation should I use to translate the old codes (based on the
country-state-city key) into the new ones and preserving the data
integrity?
Thanks,
Ignacio
View 2 Replies
View Related
Apr 20, 2006
Hi,
I m new to this forum with a Query
Create table <table name1 > as select * from <table name2>
this works for oracle. do anybody knows its alternative in sqlserver 2000
thanx. :)
View 4 Replies
View Related
Jan 15, 2008
I'm trying to create programmatically a table in my db on sql server 2005.1. I created a string "CREATE TABLE ....." and then tried to execute it using my ADO. That didn't work, so I copied the string into a query in sql server and got the message "CREATE TABLE sql is not supported". Why's that? 2. I created a stored procedure in my db that will get the "CREATE TABLE...." string and execute it. I thought it would look something like this: parameter @createString varchar(MAX) BEGIN BEGIN EXEC @createString or @createString END END Both these options didn't work.How can I make it work properly?Thanks.
View 3 Replies
View Related
Dec 22, 2003
I need a module to help me create a SQLServer database table. Is there a module that allows users to specify parameters in the creation of a SQLserver table?
View 1 Replies
View Related
May 1, 2000
Hello, folks.
I wonder whether I can create a table based on the script in SQL Analyzer.
If this is possible, can you folks tell me how to do it.
Thanks in advance.
Hyunhyo Jun
GIS Research Group
University of Colorado
View 1 Replies
View Related
Dec 18, 2001
Does anyone know if it is possible to create a tmp table in RAM without pinning it and how to do it? I already knew that SQL has a stored procedure allows pinning a table in RAM.
Thank you for any input.
View 1 Replies
View Related
Jul 27, 2006
Hi
I am trying to create a table in sql server 2000 and seem to be getting an error
the code that i am using is as folows:
CREATE TABLE Invoice
(
InvoiceID INT IDENTITY PRIMARY KEY NOT NULL Auto_Increment,
Invoice_no VARCHAR(50),
RefText VARCHAR(50),
CustomerDetails text,
)
I want to be able to have the invoiceid as the primary key that auto increments...
After creating the table id like to import a csv file with only the following data
Invoice_no, RefText, CustomerDetails
is it possible to do this as i want the id to automatically be generated to be unique
thanks
View 6 Replies
View Related
Dec 22, 2006
vijay writes "how can i creat a new table as i have in my database"
View 2 Replies
View Related
Jul 20, 2005
How do you create a new table from a SELECT statement of another tableusing MS SQL Server. This is part of a distributed database topic foruniversity. Unfortunately I can only seem to get the new table createdin Oracle and not MS.
View 4 Replies
View Related
Oct 23, 2006
I need to create tables from a C# code. I made a stored procedure hoping that I will pass a table name as a parameter: @tabName. The procedure executed in SqlServer All Right but when I called it from C# code it created not the table I put in as a parameter but table "tabName." Otherwise everything else was perfect: coumns, etc.
Here is my stored procedure.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[CreateTableTick]
@tabName varchar(24) = 0
AS
BEGIN
SET NOCOUNT ON;
CREATE TABLE tabName
(
bid float NULL,
ask float NULL,
last float NULL,
volume float NULL,
dateTimed datetime NULL
)
END
What went wrong?
Thank you.
View 6 Replies
View Related
Jan 22, 2008
My program is to create temporary table. To avoid creating the same name table, I have to create it dynamically with this code. Random rand = new Random(); string num = "Temp"+rand.Next(100).ToString(); sql = "CREATE TABLE '"+num+"' ( , , , )"; When it is exeucuted, the error message tell it has error near Temp23(num). Is it possible to create table with this way?
View 1 Replies
View Related
Apr 7, 2008
Hi All,I will like to create a table from two tables this (explained below) way using a stored procedure. Basically i want the stored procedure to return me the third table but i dont know how to do it.Table ATopicID Topic ----------------------------- 1 Sometopic 12 Some topic 23 Some topic 34 Some topic 4 Table BRateID Rate TopicID---------------------------------------1 5 12 5 13 5 24 4 25 4 36 3 5 Table CTopicID Topic Rate--------------------------------------------1 Some topic1 52 Some topic 2 5 3 Some topic 3 5Basically i have a table that stores topics associated with a particular subject. Those topics are stored in table A above. My users can just read the messages associated with the topic and rate that message. The rating is then stored in table B.Now i will like my users to search for topics with a particular word or sentence in table A and the topics that are returned have a rating they specify. My procedure takes the word or sentence to search in table A and and the rating which will be used in table B. I will like to construct another table that has this newly searched results and return it using a stored procedure or anything simple. I dont know how to do this because i have very little knowledge in stored procedures or sql..... Any help(Code) will be greatly appreciated...
View 11 Replies
View Related
Jun 4, 2008
Hello there,
I'm going to, by my site, to create the aspnet membership thing.. (you know you can run aspnet_regsql.exe and then its create a lot of tables)But I'm stuck with a table with two primary keys? How the **** is that possible?I got this code to create table:'aspnet_UsersInRolesnonqueryCommand.CommandText = "CREATE TABLE aspnet_UsersInRoles (UserId uniqueidentifier NOT NULL PRIMARY KEY, RoleId uniqueidentifier NOT NULL PRIMARY KEY)"Console.WriteLine(nonqueryCommand.CommandText)Session("Tables") = Session("Tables") + "Number of Rows Affected with table aspnet_UsersInRoles is: " + nonqueryCommand.ExecuteNonQuery().ToString + "<br />"
But you ain't allowed to have two primary keys,How do you then create this table?:
Hope for help, and as you probably already has notice is I'm absolutely not expert to this :D
Ps. Tehre shouldn't already be a code for this in vb?
View 8 Replies
View Related
Nov 25, 2003
Hi SQ Gurus,
Please help me with this issue that I am facing. I want to create a table programatically but want to pass its name as a variable. I would like to do something as follows:
CREATE PROCEDURE BS_Create
(@Name nvarchar(25))
AS
CREATE TABLE [dbo].[@Name](
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Prod_Name] [nvarchar] (75) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
The table name is passed in as a parameter. No matter what I pass as a parameter, the table name is '@Name', which is not what I want. Instead, if the variable contains the value 'Product', I would like to see a table with the name 'Product' to be created.
How can I solve this problem.
Any help is appreciated!
Krish Chandra
View 1 Replies
View Related
Dec 2, 1999
I have made a database device and a database with SQL Server.
After, I have created some tables and I have made inserts, deletes,
updates, select, etc.
I have 23 tables in my database. Now I'm trying to create a new one,
but I can't. I have this error:
"Unable to allocate new page for database 'ODDO'. There are no more
pages available or valid allocation pages.
Space can be created by droping objetcs, extending the database, or
dumping the log with no_log"
I'm not an expert in SQL Server. Can anybodt help me?
What I have to do?. What is a page?. How can I extend my database?
Thank you very much.
View 1 Replies
View Related
Sep 27, 2005
Hi all,
i m using sql server2005 CTP...i created a database called TEL and in that database i created a user(in security) as
USE [TEL]
GO
/****** Object: User [COLL_DB] Script Date: 09/27/2005 15:38:51 ******/
GO
CREATE USER [COLL_DB] FOR LOGIN [loginName] WITH DEFAULT_SCHEMA=[COLL_DB]
Now,when i m trying to create a table in the database TEL as
CREATE TABLE [COLL_DB].abc (c numeric)
commit;
it gives me error saying
The specified schema name "COLL_DB" either does not exist or you do not have permission to use it.
Now,can someone tell me...what i have to do to fix this error?????????
thanks...
View 1 Replies
View Related
Apr 29, 2012
I am having trouble creating my last table for a project.
I have a table named "Payment".
I have a composite key (ebay_ID & Cellphone_ID).
Would eBay_ID & cellphone_id also be foreign keys since they are the PK of their own table?
I also have an entity called "CC#" and "payment_amt".
For example there is a buyer who purchased 3 diff items, so the ebay_id would be the same and so would the cc#.
View 3 Replies
View Related
Feb 16, 2004
Hi
How can i Create a table with variable name
eg
suppose variable x=tab1
I want the table created to be tab1 if x=tab2 then table created shd be tab2.. so how can this be dynamically done(creation of tables as well as stored procs)
i tried : create table @x .. it doesnt seem to work
please help
regards
View 2 Replies
View Related