Clueless Client Who Wants To Create A Table Using Reserved Words

Mar 19, 2004

Hello all,
I have a database that supports two different applications.
For arguments sake I'll call them "intelligent app" and "clueless app"

The client that provided me the schema for the clueless app used reserved words as field names.
The words used are:
value, state, and time

I explained to the client that modifying them could prevent current/future issues.

The client is an "oracle" db (and in my mind should know better but .....) and responded back to me with the following:

BEGIN QUOTE
They are not currently reserved and there is no guarantee they will ever be reserved. In fact, the SQL server line eliminates as many words from the reserved list as they add with new releases. There are other words on the
possible future reserved keyword list that I do not wish to avoid either unless forced to some day, like depth, size, class, zone, level and others.
END QUOTE

Now for the assistance request, where can I find the documented ramifications of using reserved words?
I want to have my documentation (and my ducks lined up) when this clients portion of the app fails.

Any and all assistance is greatly appreciated.

T. Mullins

View 4 Replies


ADVERTISEMENT

Convert Reserved Words To Upper

Jan 14, 2005

We want to covert all reserved words
in procedures to upper case,any suggestions ?

View 3 Replies View Related

Columns Names Reserved Words [ ]

May 8, 2007

I have one column name that is: description

when i write a query the world lights up with blue, I think I saw someone using [ ] around the word but I no longer remember if this is the way to handle reserve words that have been use as columns names

View 10 Replies View Related

Reserved Words As Column Names

Nov 8, 2007

Hi there,

I'm trying to recreate a MS-SQL database in MySQL. One particular table has a column names "Precision", a reserved word in MySQL. I woudl really prefer to keep this name if possible as it will be referenced in all sorts of places. I've tried single and double quotes, that didn't work.

Is it possible to use reserveds word as column names? How?

cheers

View 6 Replies View Related

Using Reserved Words In Column Names

Jan 8, 2008



Here we go,


I have a great question for all of you.

What is the problem in using reserved words in table columns name? Any one have a compeling reason not to use?

Here is an exemple:

/ ******** Table ********/
Entity
EntityId
Name


When you query this table you should use the [ ] like this:

SELECT EntityId,[Name] FROM Entity

Anyone have any objection to this, with actual facts?

The question why use this?

This about the programing object in C#

Entity oneEntity = new Entity();

oneEntity.Name = "Test Entity";

It could be:

oneEntity.EntityName = "Test Entity";


Any one???


View 9 Replies View Related

MSSQL2000 Client Unable To Create New Table

Dec 18, 2005

HELP!
I'm new to SQL Server and I'm sure this is a simple problem.
But I can't seem to solve it.
Here's the problem:
My website & MS SQL 2000 Server are being hosted by Networksolutions.
Thru the Client Enterprise Manager I am Unable to create a New Table.
This is the error message I get:
" [MS Design Tools]-ODBC error: [Microsoft] [ODBC SQL SERVER DRIVER] [SQL SERVER] SELECT permission denied on object 'sysobjects', database 'namedb', owner'db' " :confused:

View 2 Replies View Related

Release Unused Space Reserved For A Table

Sep 22, 2005

Hey guys,

I have a table which has 6 text columns (tblA).. I no longer require 1 of those text columns and want to reclaim the space that it is currently taking up..

Is the only way to BCP out all the data (except the 1 column i no longer require) drop the column and BCP the data back into the table?

View 12 Replies View Related

Clueless

Feb 17, 2008

 Okay no clue where to start off here, long time ASP (old) coder, familiar with JScript / VBScript / WSF / VB / C# / C++ / C in order of knowledge
I'm going cross eyed trying to figure out ASP.NET's  functionalityTrying to Connect to an SQL database using the web.config and ADO.Net, but it seems recordsets are a thing of the past.
Where having an include file with
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->
<%
sub openDb()
if varType(connTemp)=0 or varType(connTemp)=1 then

' create the connection
set connTemp= server.createObject("adodb.connection")

connTemp.Open sDatabaseConnectionString

end if
end sub
sub getFromDatabase(mySQL, rstemp, scriptName)
call openDb()
on error resume next
set rstemp = server.createObject("adodb.recordset")
' set locktype
rstemp.lockType = adLockReadOnly
' set the cursor
rstemp.cursorType = adOpenForwardOnly

rstemp.open mySQL, connTemp
Isn't done in the same fashion anymore.No clue why, but writing out lines of code is what I am used to, and the built in features grid / dataview of visual studio/web dev are not what I am looking for. Not to mention the limitations of my webspace provider restricting access to MS SQL Server through VS, makes a lot of the features in VS useless.So far i've been able to manage that I can use App_Code/myclass.cs to allow for a globally called class/include file like i'm used to which is compiled on runtime.No clue how to apply it, or make it dynamic however, where I could call information from the database to populate the variables in return allow me to manipulate data..static void init(){
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DBConn"].ConnectionString);
SqlDataReader rdr = null;

try
{
conn.Open();
SqlCommand cmd = new SqlCommand("select * from Customers", conn);
rdr = cmd.ExecuteReader();
while (rdr.Read())
{  Anyone have any useful information as to where I could look to find examples of my style of programming in ASP converted to ASP.NET in C#? 

View 5 Replies View Related

Please Help With !! I Am Clueless

Aug 14, 2006

I would like to convert these IF statements into a case statement, but I have no clue as to how to achieve this. As you can see im using freetext parameters along with other paramaters, please if you can help it would be greatly appreciated.


IF LEN(@keywords)>=1 AND LEN(@organization)<1 AND LEN(@year)<1
BEGIN
SELECT DISTINCT A.RECIPIENT_STATE, B.FISCAL_YEAR, B.FEDERAL_SHARE, B.NON_FEDERAL_SHARE
FROM Tab_Awards AS A JOIN TAB_Amendments AS B ON A.AWARD_NUMBER = B.AWARD_NUMBER JOIN Tab_Program AS C
ON A.FPO_ID = C.FPO_ID
WHERE (FREETEXT(A.*,@keywords))
END

ELSE IF LEN(@keywords)<1 AND LEN(@fromYear)<1 AND LEN(@toYear)<1 AND LEN(@organization)<1 AND LEN(@year)<1
BEGIN
SELECT DISTINCT A.RECIPIENT_STATE, B.FISCAL_YEAR, B.FEDERAL_SHARE, B.NON_FEDERAL_SHARE
FROM Tab_Awards AS A JOIN TAB_Amendments AS B ON A.AWARD_NUMBER = B.AWARD_NUMBER JOIN Tab_Program AS C
ON A.FPO_ID = C.FPO_ID
WHERE A.RECIPIENT_STATE IN (@states) AND C.PROGRAM IN (@program)
END

ELSE IF LEN(@keywords)<1 AND LEN(@organization)<1 and LEN(@year)<1
BEGIN
SELECT DISTINCT A.RECIPIENT_STATE, B.FISCAL_YEAR, B.FEDERAL_SHARE, B.NON_FEDERAL_SHARE
FROM Tab_Awards AS A JOIN TAB_Amendments AS B ON A.AWARD_NUMBER = B.AWARD_NUMBER JOIN Tab_Program AS C
ON A.FPO_ID = C.FPO_ID
WHERE C.PROGRAM IN (@program) AND B.FISCAL_YEAR BETWEEN @fromYear AND @toYear
END

ELSE IF LEN(@keywords)<1 AND LEN(@organization)<1 AND LEN(@year)<1 AND LEN(@toYear)<1
BEGIN
SELECT DISTINCT A.RECIPIENT_STATE, B.FISCAL_YEAR, B.FEDERAL_SHARE, B.NON_FEDERAL_SHARE
FROM Tab_Awards AS A JOIN TAB_Amendments AS B ON A.AWARD_NUMBER = B.AWARD_NUMBER JOIN Tab_Program AS C
ON A.FPO_ID = C.FPO_ID
WHERE A.RECIPIENT_STATE IN (@states) AND C.PROGRAM IN (@program) AND B.FISCAL_YEAR = @fromYear
END

ELSE
BEGIN
SELECT DISTINCT A.RECIPIENT_STATE
FROM Tab_Awards AS A JOIN TAB_Amendments AS B ON A.AWARD_NUMBER = B.AWARD_NUMBER JOIN Tab_Program AS C
ON A.FPO_ID = C.FPO_ID
WHERE (FREETEXT(A.*,@keywords)) AND A.RECIPIENT_STATE IN (@states) AND C.PROGRAM IN (@program) AND B.FISCAL_YEAR BETWEEN @fromYear AND @toYear AND LEN(@organization)<1 AND LEN(@year)<1
END

View 2 Replies View Related

CLUELESS - Help This Panicked Dad!

Mar 27, 2006

HELP!

I am in deep do-do. I was to write a db to help with many functions of our office. I asked the web manager if I could link mty mdb file to the webserver, he said it was possible. Now I am 15 days shy of my deadline and he is now telling me I can no longer link my database due to security issues and that I must use SQL... I am not familiar with a SQL environment..... Please help!!!!

I made many forms in access to make my db really interactive like an software application and are wondering how to use data access pages with SQl to not loose my hard work.

Here is what I am given to complete my task:

1. Set up a new web site (and corresponding test site) independent from my current public site.

2. Got SQL Enterprise Manager

3. Was given db_owner privileges to a blank database using Network account

I will get fired if I can not make this work. I have 3 small children and a wife that will be devestated if that happens. Please help me with any programming that you know that will link my data access pages to SQL and/or any programming you think my benefit me in making this possible.

I really appreciate it. I am a very scared daddy right now and have no where to turn. Please HELP!!!!


Lex

View 20 Replies View Related

Need Table Of Words/glossary/etc.

Mar 3, 2005

Hi!

I have a client who wants to have a function to have a system create a validation system for users who register for a system. It would email them a registration code, which they want to be two or three random words strewn together.

So, I'm looking for a big table of words - random, glossary terms, etc. Does anyone have anything like this? (A flat file that I can import would be fine.)

Thanks!

View 14 Replies View Related

SELECT And Then I'm Clueless. Ordering And Sorting Data

Nov 13, 2007



I want to select the below info from a sql 2005 db, to use it in a dynamic datadriven menu. Only problem, I don't know how to formulate my select statement. So here's the data

ID, TEXT HREF DESCR PARENTID





1
hMenu1
link1.htm
desc text
0


2
hMenu2
link2.html
desc text
0


3
sMenuM1
link3.htm
desc text
1


4
sMenuTSMenu3
link4.htm
desc text
3


I want the data structured so that below the row with id 1, would come it's subitems, subitems for the subitems and so on. So the recordset I'd like to return would in this case be:hMenu1
sMenuM1
sMenuTSMenu3
hMenu2
I've indented the data just to make things clearer. And finally, I want the substructure to be infinite at least in theory.I also do not want to use recursive logic to do this, if possible. I can change the structure of my table if neeed.Cheers!/Eskil

View 7 Replies View Related

T-SQL (SS2K8) :: How To Create Login For Client App

Jan 30, 2015

I have a client application written from C#/winforms app that needs access SQL DB on SQL server 2008 R2 developer. So I need to create a Login for this app with a user/password. But when i created it and put it on the client's connection string, the DB could not be accessed by the client windows forms app and the error was "Login failed for User App1".

Then I tried to login to SQL server from SSMS using the credentials of App1 but it also gave same error "Login failed for user App1". I have following the following steps of creation of the login for App1. i could login from "sa" account and other Admin accounts but not from "App1" account

1. created a server level Login
2. created a DB level user
3. created a Role (a DB role), i even tried creating an App Role
4. given permission to execute stored procedures that handle login

But didn't work. Maybe i made some mistakes in those step. So, how to create an account for user "App1" so it can be accessed by the client windows app and also from SSMS? i would prefer to use account creation from SSMS GUI.

How do i install SQL server 2008R2 in local machine with network accessibility features?

View 1 Replies View Related

Create A Client Install Directory For SQL 2000

Dec 19, 2001

Is there a way to extract (and copy to a network drive) the necessary files from the SQL Server 2000 CD for the purpose of a creating a client install directory? I would like to invoke the Setup from the network. I do not want to place the whole CD on the network. I do not necessarily want to have to re-key the serial number (product key) every time a client install takes place.

View 1 Replies View Related

Cannot Connect To Sql Server 2005 From Xp Client When Trying To Create ODBC Dsn

Mar 2, 2007

Newbie here,

I am trying to link tables from an access 2003 frontend to sql server 2005 backend.

I am doing this in a vmware test environment. I am using vmware server and running sbs 2003 and xp sp2 client. Both virtaul machine can talk to each other(using local host connection).

I have tried to create a dsn to the sql server but i cannot connect. I can ping the sbs server through the command interface but the error i get when i try to connect is :

Connection failed:
Sql state: hyt00
sqlserver error: 0
microsoft odbc sql server driver timeout expired.

spent a day trying various combinations - still no joy.

Any help would be much appreciated

View 3 Replies View Related

Can't Create Excel File With SQL Server 2000 Client.

Jan 3, 2007

Hi ;

I am trying to create several Excel sheets using SQL 2000 views like so:

Select * INTO [Excel 8.0;Database="C:spreadSheetsaNew.xls"] FROM [aView].

When I try and execute this in my app I get the following - Specified owner
name 'Excel 8.0;Database=c:spreadSheetsaNew.xls' either does not exist or
you do not have permission to use it.

If I use the above Select statement with an OLEDB connection it works.

I am using Imports System.Data.SqlClient, instantiating a new SQlConnection
object, opening the connection, etc..

Thanks,

Gordon

View 1 Replies View Related

Client Connection Error While Trying To Create Maintenane Plans

Mar 1, 2007

Error:  Ole db error 0x80004005 Client unable to establish connection

This happens when trying to create a maintenance plan in sql 2005 sp 1

It has now happend with 3 installs - one fresh install and two upgrades from 2000 to 2005.  The startup account for sql server is a domain user account and has not been changed.  This happens on both windows 2000 and windows 2003. 

 

This however does not happen if the sql startup account is in the local admin group for the machine

 

Any help is greatly appreciated

Thanks

KR

View 2 Replies View Related

SQL Server 2012 :: Using CTAS Create Stored Procedure For Client

May 14, 2014

I have table named TEMPLATE_ACTIVITY. This is template table I have 27 this kind of tables.

I want to create stored procedure to change name MICHELIN_US_ instead of TEMPLATE_ all remaining name should be same. For that I am using 'Create Table As Select' to keep same structure as Template tables.

I want to create sp as like execute this way Exec @MICHELIN_US_

So that in future if Client change to MICHELIN_US_ to UNITED_ I can just change Exec @UNITED_

And it will change all table names to UNITED_ACTIVITY

I want to create this SP for different client.

View 3 Replies View Related

SQL Server 2012 :: How To Drop And Create Synonym Without Client Error

Apr 23, 2015

A heavily-selected database will be in an inconsistent state for several hours during a batch process. For that time, a database snapshot is created and accessed instead. To allow constant client read access to the database, a database that only contains synonyms exists. Those synonyms point to the main database except during the batch process, at which time they point to the database snapshot.

To switch the synonyms, each synonym is dropped and then created pointing to the database snapshot (after its creation, of course). The drop/create occurs inside a transaction. Roughly, the SQL looks like this:

SET XACT_ABORT ON;
BEGIN TRANSACTION;
DROP SYNONYM [dbo].[some_proc];
CREATE SYNONYM [dbo].[some_proc] FOR [snapshot_db].[dbo].[some_proc];
GRANT EXECUTE, SELECT ON [dbo].[some_proc] TO public;
COMMIT TRANSACTION;

When the batch update is completed, the process is reversed with "snapshot_db" replaced with "regular_db". The SQL snippet above is dynamic SQL. What I've pasted is the dynamic SQL that is executed as a single batch.

While this switch is happening, clients are accessing the procedures through the synonyms, potentially at a high request rate. Testing reveals that clients can get the error:

Error=-2147217900, Id=0, Meaning=IDispatch error #3092,
Source=Microsoft OLE DB Provider for ODBC Drivers,
Description=[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.some_proc'.

This error only occurs once. If the same SPID retries its request and the transaction has not completed (for testing, a delay was added), then it blocks until the transaction completes.

Any way to prevent it besides a client-side retry?

View 2 Replies View Related

Order By Using Reserved Keyword?

Jan 12, 2001

Hi,

We have a table with a column called 'text' Yes, text is a reserved keyword for data type. I can select it 'SELECT text FROM thistable' but when I try to use it in the order clause, 'SELECT text FROM thistable ORDER BY text', I get this error:

'The text, ntext, and image data types cannot be used in an ORDER BY clause'

I know, you're not supposed to used reserved keywords but the person who initially created this didn't know. We would prefer not to change the column name as this would require tons of changes in the code & COM object.

Is there a way to order this column?
Thanks.

View 2 Replies View Related

How Do I INSERT Reserved Characters?

Mar 2, 2001

The Query:
INSERT INTO Table1
VALUE('this doesn't work')

How can I Insert strings like the one above, into my database?

View 3 Replies View Related

7.0 Reserved Word List

Sep 24, 1998

Does anyone know where I can get a 7.0 reserved word list?

View 1 Replies View Related

Reserved Word Zinger!!

Apr 29, 2002

I migrated a SQL7 database to a SQL2000 server by restoring from a backup file. Everything worked fine until we restarted the SQL Service a few days later and suddenly a table named Function caused me much grief

It seems Function is a reserved word in 2000 - but not in SQL 7.

I am guessing the restore fooled the system into thinking it was a SQL7 database until the restart? Anyone have any ideas why else it would have worked just fine for 5 days, then die on a restart of SQL service (not even a reboot!)

Sandie

View 1 Replies View Related

Replacing A Reserved Keyword

Feb 11, 2014

I've got a sproc that we are migrating from SS2K that uses the reserved keyword 'Pivot'. Best way to replace it. I think it is renameable until the select from TempDB (which is mysterious as I can't see a table in tempDB by that name!!) as below...

CREATE PROCEDURE [dbo].[sp_CreateXtab]
@select varchar(8000),
@sumfunc varchar(100),
@pivot varchar(100),
@table varchar(100),
@SQLOutput varchar(8000) OUTPUT

[code]....

View 3 Replies View Related

Create Table From Text File, Extract Data, Create New Table From Extracted Data....

May 3, 2004

Hello all,

Please help....

I have a text file which needs to be created into a table (let's call it DataFile table). For now I'm just doing the manual DTS to import the txt into SQL server to create the table, which works. But here's my problem....

I need to extract data from DataFile table, here's my query:

select * from dbo.DataFile
where DF_SC_Case_Nbr not like '0000%';

Then I need to create a new table for the extracted data, let's call it ExtractedDataFile. But I don't know how to create a new table and insert the data I selected above into the new one.

Also, can the extraction and the creation of new table be done in just one stored procedure? or is there any other way of doing all this (including the importation of the text file)?

Any help would be highly appreciated.

Thanks in advance.

View 3 Replies View Related

Cannot Use The Reserved User Or Role Name 'db_datareader'.

Oct 21, 2005

Hi, I have got a problem. When I try to access my database table Users, I get the following error:

SELECT permission denied on object 'Users', database 'Users', owner 'dbo'.

So
I tried to grand this select command in MS Web Data Administration, but
it doesnt work. When I try to grand db_datareader role to dbo, I get
the following error

[Microsoft][ODBC SQL Server Driver][SQL
Server]Cannot use the reserved user or role name 'db_datareader'.

Does someone have an idea where could be a problem?

View 1 Replies View Related

Reclaiming Reserved Space For Tables

Jan 23, 2008

Dear Friends,I'm running a SQL 2005 database. Lately (in the last 4 months) my database size has grown exponentially and now totals 2.5 gig (it used to be about 100mb). When I run sp_spaceused i get the following info:
Reserved Space 2522MB
Data 450MB
Indexes 215MB
Unused 1856MB
<!--[if !supportLineBreakNewLine]-->
The unused space is reserved by my two largest tables, one being 542mb (which is a log I create and the size seems fine for the amount of data) reserving 1033mb and the other being 121mb (which is another log and also seems fine) reserving most of the rest.

I have tried running DBCC SHRINKFILE and DBCC CLEANTABLE commands on a backup copy of the database and cannot seem to free the unused space.

I have also tried copying the database in an attempt to reduce the unused reserved space and have tried creating a new database and importing the tables with no luck

Any help would be greatly appreciated, noting that I'm honestly not that technical and would probably need step by step instructions, but if you only have time to point me in the right direction that would also be of great help!

Jano

View 9 Replies View Related

Work Around Of Using A Reserved Word In OLE DB Destination?

Jul 25, 2007

Hi!



We are encountering an issue of using OLE DB destination with the field name of the table is a reserved word in the database.



The database is DB2 V8 (mainframe). "partition" is one of the reserved word in V8 (It is not in the previous version and the whole thing worked fine).



It errors out when it reaches to the OLE DB destination task to do the insert. It complaints about using the reserved word, "partition". We could use an "OLE DB command" (instead of a to do an OLE DB Destination) with the insert SQL statement explicitly by putting double quote around the field name, partition in the insert statement. It works this way. But We wondered if there is any work around of using a reserved word in OLE DB destination in that case?



Thanks!

View 10 Replies View Related

Replication :: Reserved Column Names?

Mar 8, 2010

I am attempting to define a Transactional Publication with Updateable Subscriptions.

One of the articles in the definition has a column called "insertDate" The attempt fails with"A .NET Framework error occurred during execution of user-defined routine or aggregate "sp_MSmakeconflicttable_ sqlclr" System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name insertdata in table 'conflict_ <Publication Name>_<TableName>' is specified more than onceDoes sp_MSmakeconflicttable_sqlclr attempt to create a derived table with this additional column.

Must I rename my column.Are there any other names I should watch out for (other than the standard reserved keywords).

View 8 Replies View Related

Sp_xml_preparedocument CDATA Reserved Characters

Nov 29, 2007



I have tried both in sql server 2000 and sql server 2005 the following code:

DECLARE @DOC VARCHAR(100)
DECLARE @HDOC INT
SET @Doc='<datos><texto><![CDATA[línea átona]]></texto></datos>'
EXEC sp_xml_preparedocument @HDOC OUTPUT, @DOC
SELECT * FROM OPENXML(@HDOC,'datos',2) WITH (texto nvarchar(50))

I always get an error 6603 in SQL2000 and 6602+8179 in SQL2005, wich means it can't parse the 'í' and 'á' characters, though they are in a CDATA.
I have tried with <,>,@ characters and it works fine.

I have also tried using '&aacute;' and '&iacute;' without CDATA but I get the same message:

DECLARE @DOC VARCHAR(100)
DECLARE @HDOC INT
SET @Doc='<datos><texto><l&iacute;nea &aacute;tona></texto></datos>'
EXEC sp_xml_preparedocument @HDOC OUTPUT, @DOC
SELECT * FROM OPENXML(@HDOC,'datos',2) WITH (texto nvarchar(50))

View 5 Replies View Related

Problems On Create Proc Includes Granting Create Table Or View Perissinin SP

Aug 4, 2004

Hi All,

I'm trying to create a proc for granting permission for developer, but I tried many times, still couldn't get successful, someone can help me? The original statement is:

Create PROC dbo.GrantPermission
@user1 varchar(50)

as

Grant create table to @user1
go

Grant create view to @user1
go

Grant create Procedure to @user1
Go



Thanks Guys.

View 14 Replies View Related

Boolean: {[If [table With This Name] Already Exists In [this Sql Database] Then [ Don't Create Another One] Else [create It And Populate It With These Values]}

May 20, 2008

the subject pretty much says it all, I want to be able to do the following in in VB.net code):
 
{[If [table with this name] already exists [in this sql database] then [ don't create another one] else [create it and populate it with these values]}
 
How would I do this?

View 3 Replies View Related

Dynamic Create Table, Create Index Based Upon A Given Database

Jul 20, 2005

Can I dynamically (from a stored procedure) generatea create table script of all tables in a given database (with defaults etc)a create view script of all viewsa create function script of all functionsa create index script of all indexes.(The result will be 4 scripts)Arno de Jong,The Netherlands.

View 1 Replies View Related







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