thanks is there a way to dump this query into a new table or view I have tried but get an error
Column names in each view or function must be unique. Column name 'id' in view or function 'vwPATSInspectionCurrentDate' is specified more than once.
I have one table that has multiple id's and associated dates as well as other fields. I would like to query all the id's with the id's latest date entry and include other fields in this query. The following query selects the one id value and its latest date entry:
SELECT id, MAX(InspectionDt)...
I have attempted to remotely connect to a SQL Express database server via SQL Server Enterpricse Management Studio using windows authentication but I get the following error message:
"an error has occured while establishing to the server. When connection to SQL Server 2005 this failuer may be...
I have a where clause looking for blanks and nulls in a column e.g.,
where column is null and column = ''
Is there a way to combine these into one where statement? I am looking for either or.
I would like to find the following occurences of invalid values in a field.
The first occurence is I have a field that limits the number of characters to 7. However users sometimes enter values in this field that are 6 characters or less. Is there a way to query these out?
The second occurence...
I have moved a disk array from an old server to a new database server which has sql databases on them. I restored the databases from backup tapes into new databases. I would like to remove the original databases from the array. The new database has not been connected to these original databases...
What SQL syntax would I use to search for only lower case letters in a given field. This is done in SQL 2005. The field should only have upper case. I need to convert the lower case to upper case.
a little healthy debate is good as well. I use a SQL Server database and in their help, they dont recommend allowing nulls. So it really seems that it depends on individual workflow requirements.
I can set my fields in the database to not allow nulls into a field, it will put an empty string instead, therefore i have one bland value. I am not concerned with the difference between a null and empty string. all i want to know is does it have a value or not. having an empty string makes...
I realize there is a debate about the validity of whether or not nulls should be used. There are valid debates to support either argument. My original question has nothing to do with the debate on nulls. I have already figured that out, now I want to get rid of them. Is there a way, specific...
I just received a database full of tables from an outside source. These tables have multiple fields in each of them. My question is this database allowed nulls in all the fields. Is there a way/script that I can run that would automatically convert the nulls to not nulls. I would like to avoid...
I have a database with a log file (ldf) that has grown to 90gb. I would like to reduce this size of this file. Approximately 99% of this file is used. The Shrink command will not reduce it any lower than 90gb. It seems that there are a bunch of transactions in the log file that need to be...
I have a question about yoru first comment "Denny has a point - if they can see the data they can make a copy of it if only by typing it themselves into a spreadsheet." I dont understand you are saying here. Are you saying the only way a user who has Select privileges can copy a table is to...
Does anyone know if you can prevent a user from exporting a table from a database to another database/format. I would like to prevent users from making copies of the database data.
Thanks for your response. I dont understand exactly what you mean, an example would help. I should also mention that the statement exists within a SP.
CREATE Procedure StandEdit_ErrorCheck
@TableName VarChar(100)
AS
--check for missing standid values
declare @standid varchar(100)
Declare...
The following dynamic sql statement executes the first print statement when the @standid variable is not null. Any ideas, perhaps a dynamic sql qwerk?
declare @standid varchar(100)
Declare @SQL VarChar(1000)
SELECT @SQL = ' SELECT' + @standid + '= standid FROM ' + @TableName + ' where...
I cannot get the debugger in Enterprise Manager to work correctly. I would like to be able to step through a stored procedure but when I set a break point and run the code it the debugger does not stop at the breakpoint. This may help, all of the step buttons, restart and stop debugging are...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.