Creating A Job With A Database That Has Hyphen

Jun 22, 2004

Hi,

1- I have given a dbo permission on a database named F12345-1, now I want to create a job on that server using this database.

2- I tried to create the first step in the new job but I don’t see my database name on the databases drop down menu (I only see the system databases)

3- I tried being under Master and using the USE sql command (Ex: Use F12345-1) at the beginning of my step but I get a message saying that the database F12345 doesn’t exist (The message doesn’t say the whole database name only the part before the hyphen)

4- I tried putting quotes around the database name with no luck, although that worked in SQL Query Analyzer but the Job didn’t like it.

Can you please help with this, knowing that I have no control on the database name (In order to remove the hyphen from the name which I am assuming is the cause of this problem)

Thanks

View 3 Replies


ADVERTISEMENT

SQL 'Hyphen' Problem...

Aug 24, 2001

I am new to SQL.

But here is my question. I have a column 'name' and contents are like
A-B, C-D, E-F

When I query DB using, SQL

select * from tbl_Names
where name='C-D'

it does not display anything...
What am I doing wrong?

View 1 Replies View Related

SQLServer Name With Hyphen

Dec 30, 1999

Does anybody knows a workaround to register SQLServer with the name which contains hyphen('-') character in it? I work for multi-national company & they have naming standard for NT servers & this server has hyphen in it.
Also site server guru here thinks that server name change option is not feasible. Please help.

View 1 Replies View Related

Using A Hyphen In SQL Server Name

Oct 14, 2003

We are about to name a new SQL Server and was wondering if anybody has any documentation/knowledge that states one should avaoid using hyphens when naming Servers, objects, etc in SQL.

I have always heard its bad practise, but have not found any solid documentation. For example, I know that the 'connect to' statement does not like hyphens, but what about a SQL Server name on the network ?

Thanks

View 2 Replies View Related

Know Of Any SQL Function That Would Chop-off The Hyphen From The Zipcode??

Dec 14, 2006

Anyone know what's the MS-SQL function that look at the zipcode like "30296-6912" and chop off the "-6912" suffix by just looking at the hyphen part?

Thanks...

View 6 Replies View Related

Order By Ignoring The Hyphen Character

Sep 24, 2007

Hi,
I'm using the following SQL script to return a list of part number and the order is not what I expect. Perhaps this is a collation problem but I have no idea where to look to modify that.

Thanks in advance, John
select part from transactions T where (T.transdate between '20070701' and '20070705') and
(T.transtype = 'ISSU' or T.transtype = 'RTRN') order by part


Here is the beginning of the Transactions table create script


CREATE TABLE [Transactions] (
[RecNo] [int] IDENTITY (1,1) NOT NULL,
[Part] [nvarchar] (30) NOT NULL ,
[TransDate] [nvarchar] (8) NOT NULL ,
[TransType] [nvarchar] (4) NOT NULL ,
[FromLoc] [nvarchar] (10) ,


The 'Part' column is an alphanumeric field. The problem I am having is that the
Order By seems to ignore the hyphen character '-' when the returned rows
are ordered by the Part (which can contain hyphens in any column).

Here is an example of what I get.

130909N9
130909N9
130909N9
1-480698-0 * These two should not be here
1-480699-0 *
15-423
164-07700
164-07700
164-07700
1683


I was expecting this ( and I get this in and older database ).

068-03000
068-03000
06A19956
074-03200
077-367-0
08DU08
1-480698-0 * These should be here eariler in the data
1-480699-0
100-364072
100-364072

View 3 Replies View Related

Inserting A Hyphen (-) Into The 3rd Position Of A Nvarchar Field

Sep 13, 2004

I have a colum of numbers, which datatype is nvarchar;

157853
4389
1999999999556
4568987

I need to insert a hyphen, 3 spaces from the right (to left) My numbers would look like this:

157-853
4-389
1999999999-556
4568-987

...do I use the rtrim function ?...what would the syntax look like ?

Thank you

View 3 Replies View Related

Replication Fails When Table Name Has Single Hyphen

Dec 7, 2006

Hey,

I have SQL Server 2000 DB that was converted via DTS from Acccess 97. Replication fails for any table with a single hypen in the table name. If I copy one of these tables to a name using an underscore rather than a hyphen, then it replicates successfully.

Below are errror messags from agent with -Outputverboselevel set to 2. I have also seen 'Agent error code 20082', in which case the replication command is incomplete.

Any ideas?

Thanks,

Bill Coulter



[12/7/2006 1:22:40 PM]172.23.150.51.engdata: {CALL sp_MSupd_br1-16 (NULL,?,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,?,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,?,0x0200020000)}
Parameterized values for above command(s): {{N'00000000001010000100', N'000000000000000000', N'730535L1205C'}}
Agent message code 20046. Syntax error or access violation
[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_distribution_history(57, 6, ?, ?, 27, 27, 2.32, 0x01, 1, ?, 1, 0x00, 0x01)}
Adding alert to msdb..sysreplicationalerts: ErrorId = 18,
Transaction Seqno = 0000108b000028f2000400000000, Command ID = 1
Message: Replication-Replication Distribution Subsystem: agent OUSBID02-engdata-172.23.150.51-57 failed. Syntax error or access violation[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_repl_alert(3, 57, 18, 14151, ?, 1, N'OUSBID02', N'engdata', N'172.23.150.51', N'engdata', ?)}
ErrorId = 18, SourceTypeId = 1
ErrorCode = ''
ErrorText = '{CALL sp_MSupd_br1-16 (NULL,N'00000000001010000100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'000000000000000000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'730535L1205C',0x0200020000)} '
[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_repl_error(18, 0, 1, ?, N'', ?)}

Category:COMMAND
Source: Failed Command
Number:
Message: {CALL sp_MSupd_br1-16 (NULL,N'00000000001010000100',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'000000000000000000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,N'730535L1205C',0x0200020000)}
ErrorId = 18, SourceTypeId = 4
ErrorCode = '37000'
ErrorText = 'Syntax error or access violation'
[12/7/2006 1:22:40 PM]OUSBID02.distribution: {call sp_MSadd_repl_error(18, 0, 4, ?, N'37000', ?)}

Category:ODBC
Source: xxx.xx.xx.xx
Number: 37000
Message: Syntax error or access violation

View 8 Replies View Related

SQL Server 2012 :: Hyphen Delimited String Manipulation

Oct 19, 2015

I am having a field 'Flight Route that holds hyphen delimited character sequences.

E.g. : ABC-BCD-DEF-EFG.

My requirement is like this:

If the flight route is:

ABC-BCD-BCD-DEF make it ABC-BCD-DEF
ABC-ABC-BCD-DEF make it ABC-BCD-DEF

i.e. 'whenever a sequence repeats,only one appearance of that sequence should be displayed.The field Flight Route has to be updated with this replaced string.

View 6 Replies View Related

Problem With Hyphen In Full Text Catalog Search

Jul 23, 2005

Hi All,we have a problem with the Full Text Catalog Search.We use the following SQL Statement for matching companies from a table:select company, lastname, firstname, pkcustomers, fkcustomers,location, title, fkFunktionen, TypeOfPositionfrom customerswhere (fkcustomers = 0 or fkcustomers is null)and active = 1and pkCustomers in (select [KEY] from CONTAINSTABLE(Customers, Company,'"*SEARCHTERMS*"'))order by company ascThe search so far is working perfect.Now the problem: There are two companies in the table called "i-fabrik"and "b-wise". There´s no way to find these two companies. I find outthat the search is successful if there are more than three letters infront of the hyphen (for exampe iii-fabrik or bbb-wise). How can thatbe? Why exactly 3 letters?I hope somebody can help me.Best regardsMarkus Weber

View 1 Replies View Related

Data Warehousing :: Query To Extract All Text After Hyphen From String Containing Comma Separated Text

Aug 27, 2015

I have a parameter value as shown below and this is dynamic and can grow 

Example : 101-NY, 102-CA, 165-GA
116-NY, 258-NJ, 254-PA, 245-DC, 298-AL
How do I get the values in the below format
NY,CA,GA   --- each state to be followed with comma and the next state
NY,NJ,PA,DC,AL   --- each state to be followed with comma and the next state

correct query that will fetch  only state names and not the numbers.

View 8 Replies View Related

Creating Database From Stored Proc With Variable Holding The Database Name

Aug 16, 2007

Here is my code


ALTER PROCEDURE Test
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @From varchar(10)
DECLARE @To varchar(10)
DECLARE @DBName varchar

SELECT TOP 1 @From = CONVERT(char,CreateDate,101) FROM CustomerInfo
WHERE TicketNum =
(SELECT TOP 1 TicketNum FROM CustomerInfo
WHERE CreateDate <= DATEADD(mm, -30, CURRENT_TIMESTAMP)
ORDER BY CreateDate DESC)
SELECT @To = CONVERT(char,GETDATE(),101)

SET @DBName = 'Archive_SafeHelp'
CREATE DATABASE @DBName + ' ' + @From + ' ' + @To
END


I am trying to create a database based on the name contained in the variables. I get the error 'Incorrect syntax near '@DBName'. How do i accomplish this?

Thanks
Ganesh

View 2 Replies View Related

Guidelines For Creating A Database Snapshot On A Mirror Database

Nov 24, 2006

Hi guys, can I know the steps on creating a database snapshot on a mirror database? Thx for the assistance. :)



Best Regards,

Hans

View 1 Replies View Related

Creating Database

Jun 26, 2006

How do you create a SQL database (Sql Express 2005) in real time using VB.Net 2005 ASP.net 2.0?

View 2 Replies View Related

Creating Database

Dec 4, 2007

I am working on site in asp.net with c# and using database sql server 2000 and managing all  the data on server i have created one database on server and in that i have created 15 table.  should i continue with the same or create another database for table.
tell me how many tables should i maintain in  one database. and what precausion should i take while mainting database to increse the speed of site.and what precausion should i take to avoid serverload
please guide me i dont have an idea.
thanks for spending ur valuable time for me.

View 8 Replies View Related

Need Help On Creating A Database

Nov 21, 2003

Sorry, I'm a newbie out there when it comes to creating database. I currently have an ASP.Net project which requires a database. I spent the past few days thinking about how to create a proper database for the application but to no avail. I think tis thread might be out of point for tis forum, but i am really in need of help.

Here goes the storyline of my database:

The project is an online project management system, meant for students to submit their deliverables (reports, eg. Minutes, agenda, project monitor chart) Lecturers will access the web application to grade the student’s submission. The application must allow administrators to add in new subjects. When a new subject is added, the subject leader will set a dateline for a particular module to be submitted. Eg, minutes dateline. Once the dateline is due, the system will inform the lecturers in charge of who/which group did not submit the module. Lecturers and subject leaders can then generate warning letters to be sent via email to the students involved. Lecturers and subject leaders will be able to make announcements through the system as well.

A student can either submit his/her work as an individual or as a group.
A student will be studying more than 1 subject.
A subject will consist of more than 1 module.
Every module will have a dateline for its submission.
Students can make more than 1 submission for each module.
Students belong to different groups/classes for different subjects.
For different modules, there will be different fields to be inserted into the database.
Example, in the “Minutes module�, the student will have to be able to key in the objectives, the date of the meeting, the venue, its members, absent members, actual minutes, action by and meeting end time.

In the “Project monitor chart module�, the student will have to key in the week/date, the name of the member, task involved, as well as the status.

When a new subject is created, the subject leader will have to specify the percentage of each different module. (Eg, Exams – 40%, Term test 15%, and so on.)

A subject will also be taught by more than 1 lecturer. So subject leader will specify the lecturers teaching that particular subject.


I hope someone out there can help me out on the construction of a database for the above storyline. Thanks a lot.

View 1 Replies View Related

Creating A Database Using ASP.NET

Jan 14, 2004

Hi All,

Can anybody help me/does anybody have the code to create a database on ms sql server 2000 using asp.net?

This needs to be done without being asked for the sql server login credentials (i.e the sa username/password can be inserted in the code)

View 8 Replies View Related

Creating A Database With A GUI

Aug 19, 2005

Is there any tools to create a database with tables, views, and all that jazz with a GUI. I went through the exammle on beta.asp.net but the way they created their db was with a script. I want to create everything with a GUI app. If this gui app doesn't exist can someone point me to where I can find more info about creating db, tables etc with sql server 2005 express? Thanks in advance.-Daticus

View 2 Replies View Related

Creating A Database

Oct 14, 2006

I have an excel document that Imported to access database. That database should count the number of tickets created by each tech rep; list the area, sub area and description of call created by a the tech rep. Can access perform this task and if yes, any idea I to approach that project or should i use SQL, And if access won't be able to do it. please make a suggestion how to approach this project. it will be nice if i can get the steps.


EXAMPLE
Request Id SRS Started Call Description Area Sub Area Request Status Closed Date Assign To Created By

View 2 Replies View Related

Creating A New Database

Apr 12, 2004

I created a database using the following command :

create database krish on (Name='krish', filename='C:Program FilesMicrosoft SQL ServerMSSQLdatakrish.mdf', size=25, maxsize=50,filegrowth=5%)

This actually created the database. Now, I wanted to view this database info being stored inside the SQL Server system tables. I looked at "sysdatabases" table and found an entry as expected for "krish" but I could not trace where the info corresponding to the size of the database was stored ie.25MB . (I looked ad "sysdevices" but couldn't find any entry for the newly created database).

In which table is it stored ?

Any help is appreciated.

View 2 Replies View Related

Creating Database

Jan 30, 2007

suppose if we want to create a database and all it relative things to a new server , for that if we restore the backup copy of that databas in a new server will it create the database and restore the data.
Is it enough to restore the backup copy or we need to restore the log also.

View 2 Replies View Related

Creating New Database

Jun 11, 2007

I've done a lot of stored procs and modified tables but now I need to create a very basic database from scratch and wonder on how the best way to get started or any good tutorials out there.

I need a db with the following

Content Table
Customer Table
User Table

View 1 Replies View Related

Need Help For Creating A SQL DataBase

Nov 26, 2007

Hello everybody, my name is Andy,

I need help for creating a database, it's an exercise for my school, we just began to learn SQL, about entities, relationships (one to one, one to many...), creating tables, but the thing is i don't know where to start, i think i need to practise but it's hard to transform a text into a database, i think i need some help from you guys and i hope you will help me.

I give you the exercise, and what i found :


Project wants users to be able to initiate debates, post articles and get to the achieved items. A user should be able to write as many articles as desired after having register with login and passport

However articles should contain these references for more http links, URL, summary of the content; 1 or more books, article, doc, case studies …

1)Identify the data objects and relationship and draft the initial ER Diagram with entities and relationships. Normalize model as far as you can

2)write the SQL query / link (url) and corresponding summary

About the 1)
Entities : users --> login and password associated (one to one relationships one user = one login/password)
Articles --> associated with the users accounts (one to many)

I am not sure for creating the different tables, im a bit lost... :s

About the 2) totally lost, i need the 1) to make the SQL Query (i know a bit about queries)

I hope you will help me, i am a beginner in SQL (only one course taken) and it is our first exercise, thanks for your help all!!!

View 2 Replies View Related

Creating Database

Feb 20, 2008

Hi,
I am developing a Translator for a Mobile Phone and i have to create a database for storing English, Esperanto and French words. What are the SQL statements should i write to create the database and how can i deploy the database in a Mobile Phone/PDA?

View 1 Replies View Related

Creating A Dev Database

Dec 16, 2006

Hi,

I have a test database running on the server. Now what I want to do is to create a dev db that has the exact same data model as the test one so that I can test out my application on the dev db and then migrate it to the test db. Can somebody tell me how I can achieve something like that.

Thanks...

View 1 Replies View Related

Creating A Database

May 12, 2006

OK,

I have downloaded and installed 2005 express. All I want to do now is create a new database. I do not see where to do that. All that was installed was the SQL Server Configuration Manager and the Surface Area configuration. Am I missing something. I guess I am looking for something similar to Enterprise Manager. Where is it?

View 4 Replies View Related

Creating A Database

Oct 16, 2007

I'm rusty with database design just yet so trying to improve. This is my way of creating a database in Access but before i swap over to SQL structure i would like a good foundation.

Overall the way i looked at it was you had to have one table that held all your results that users entered and the query took care of the rest??? So for example (Red indicates a Primary Key)

tbl_Products
ProductID
ProductCode
ProductDescription
ProductUnit
ProductQuantity
ProductPrice

tbl_Month
MonthID
Month

tbl_year
YearID
Year

tbl_Department
DepartmentID
DepartmentName

tbl_Employee
EmployeeID
EmployeeFirstname
EmployeeLastname

tbl_Orders
OrderID
OrderProductCode
OrderProductDescription
OrderProductUnit
OrderProductQty
OrderProductPrice
OrderMonth
OrderYear
OrderDepartment
OrderEmployee

I then have the following relationships (1 to Many):

ProductCode (1) - OrderProductCode (Many)
MonthID (1) - OrderMonth (Many)
YearID (1) - OrderYear (Many)
DepartmentID (1) - OrderDepartment (Many)
EmployeeID (1) - OrderEmployee (Many)

Ok your'e probably thinking what if i need to add another Employee or how would i retrieve Employee or month details - to add another Employee the user would have to enter the details on another form which allows them to add another Employee. To select an Employee on the Order Form i would create a combo box which allows the user to pick an Employee.

To create a query to pull product Code, Description, qty, price and Employee name (to see which employee placed the order) i would add the following to a query

ProductCode (From tbl_Products)
OrderProductDescription (From tbl_Orders)
OrderProductQty (From tbl_Orders)
OrderProductPrice (From tbl_Orders)
EmployeeFirstname (From tbl_Employee)
EmployeeLastname (From tbl_Employee)

This is the way i thought you should create a database but i'm a developer therefore only work with databases when the query is created by a db admin. Guess i have something wrong here?? if so how would you go about creating this type of database? Overall purpose of the database is usually a user entering data and retrieving data every so often.

Thanks in advance.

View 4 Replies View Related

Creating A New Database

Oct 13, 2015

I am developing a test solution using Visual Studio and need a sql database. I have sql Management Studio (2008 & 2014) but when I try to create the database I get an error saying I need administrator permissions (or similar). This is a personal laptop with only me as a user and I AM the administrator.How do I create the database?

View 6 Replies View Related

Creating A Database

Aug 15, 2006

Hi. Im brand new to using SQL. I downloaded the SQL Server 2005 Trial Edition (Enterprise Evaluation Edition) and installed it. How do i create a database ? The only thing i can seem to open is the SQL Server Configuration Manager which just lets me start the Server. Did I install it wrong or open the wrong program? If someone could help I would greatly appreciate it.

View 10 Replies View Related

Creating Database

Jul 13, 2006

I have been using microsoft office access to create database and connect to application built. This is the first time trying to create database using the sql server. How do i create a database using this?

Do i use the sql server management to create it?

Is there any step by step tutorials?

How do i connect the database to the web developer?

View 5 Replies View Related

Creating A New Database Programmatically

Aug 30, 2006

I've seen several post asking for that possibility, but all 've read, didn't help me.Some sing SQLDMO, other suggest to use SQLSMO, others only explaining to connect to a server and then do "CREATE DATABASE".I will do this within .Net. Connecting to a SQL Server 2005 and execute "CREATE DATABASE" I could realize.But how doing this with SQLExpress? Trying to do  SqlConnection.Open with a non existing DB does not work., says "file not exists".Or do I only have the wrong connection string? Can someone post here an excample connection string, which works with a non existing database?Some hints I've read make me considering to use SQLSMO. But I don't have it on my computer. Where do I get it from? Any links would be nice.

View 6 Replies View Related

Need Help Creating SQL Database With Auto_increment

Dec 29, 2006

I've tried copying the tutorials and this is the result:
test6 below is accepted: 
CREATE TABLE test6(id smallint,first_name nvarchar(50) NOT NULL,last_name nvarchar(50) NOT NULL,movie nvarchar(50) NOT NULL,PRIMARY KEY(id));
test7 below is rejected: 
CREATE TABLE test7(id smallint auto_increment,first_name nvarchar(50) NOT NULL,last_name nvarchar(50) NOT NULL,movie nvarchar(50) NOT NULL,PRIMARY KEY(id));
My provider is GoDaddy, the error message is -2147217900, with "Line 2: Incorrect syntax near 'auto_increment'.

View 2 Replies View Related

Creating A Database From A Form.

Feb 9, 2007

I've made a form and now all I want to do is save everything in the form into a new database file but I don't know how. I'm using Visual Web Developer 2005. Somehow I'm guessing that I have to set something somewhere so when the submit button is hit, it knows to save it to a database file which doesn't exist yet so it would have to create it. It should be easy but I can't figure it out.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved