Hello,
I am implementing a data base design that has a vehicle table, vehicle engine and vehicle gear table with SQL 2005.
Each table has an ID that is a SQL identity number, and each engine and gear has a relation with the vehicle ID.
So before I create a vehicle I must create an engine and gear.
How could I know the vehicle identity...
I have a few huge tables on a production SQL 2005 DB that need a schema update. This is mostly an addition of columns with default values, and some column type change that require some simple transformation. The whole thing can be done with a simple "SELECT INTO" where the target is a table with the new schema.
Our tests so far show tha...
Lets say a have a table
t (id int, someVeryLongText text)
and want to store the result of a query:
select someVeryLongText from t where id = 1
in the file.
In Managemant Studio when I select Tools->Options->QueryResults and choose Results to File It seems that only the first 8192 characters are written to the file.
Is there an op...
Is there a built in way in SQL Server 2005 to audit things specifically like deleting a stored procedure? Is there a history table that I can query? We have a mystery sproc that has disappeared a few times now.
...
I am wondering if it is possible to see stored procs that are being executed by other stored procs in Sql Server Profiler, is it possible, and if so how?
...
SQL Server 2005 Express Edition SP2 supports scripting of objects into separate files. By default, the filenames include the name of the object's owner, the name of the SQL object followed by the object type. For example, dbo.Employee.Table.sql or dbo.GSP_EmployeeUpdate.StoredProcedure.sql. Though this naming convention may help one to...
Is there a way to easily sort in SQL Server 2005 while ignoring hyphens in a string field? Currently I have to do a REPLACE(fieldname,'-','') or a function to remove the hyphen in the sort clause. I was hoping there was a flag I could set at the top of the stored procedure or something.
Access and the GridView default sorting seems to...
we have SAP Business One - Fourth Shift Edition running here at a small manufacturing company. The consulting company that has come in to do the installation/implementation uses the "sa" id/pass to initially connect to the database to get the list of companies. From then on, I have to assume that its the sa id/pass that is being used t...
I dropped a database from SQL Server, however it turns out that my login was set to use the dropped database as its default. I can connect to SQL Server Management Studio by using the 'options' button in the connection dialog and selecting 'master' as the database to connect to. However when ever I try to do anything in object explorer i...
I've read all the posts about prefixing the numbers with ', and setting IMEX=1 in the connection string; nothing seems to do the trick for me.
Here's the setup: Excel column with mixed data - 99% numbers (some start with 0) 1% text.
PROGRAMATICALLY mporting into SQL Server 2005 table / column type - varchar(255).
Import works fine lo...
At work we recently upgraded from Microsoft SQL Server 7 to SQL 2005. The database engine is a lot more advanced, but the management studio is pretty awful in a number of ways. Most of our developers decided they preferred to stick with the old Query Analyzer tool, even though it had a lot of limitations.
In my spare time, I decided t...
I have an SSIS package that connects to a mysql server and attempts to pulls data from different tables and inserts the rows into a SQL Server 2005 database.
One issue i notice is that at any given time it runs, regardless of what step it is on, it almost always fails to bring in the total records from mysql into sql server.
there are ...
I have two tables one has a three column composite key. The other needs to reference this composite key.
What is the syntax for creating a foreign key which references multiple columns.
I tried googleing, but I couldn't find it.
...
Background:
I'm writing a data provider that SSAS will use to get data from a third-party system.
I wrote a tool that will build cubes, dimensions, measure groups and measures based on the configuration of the third-party system using AMO.
Now, in the Cube Browser, I am able to pull the members of the dimensions, however, measure data ...
I've been developing a winforms app tied to sql server. I haven't rebooted in a while. Today i rebooted and now I can't log into sql. I used every account I know and their passwords including one that was working just before i rebooted and i get a 'Login failed' . I did take the database I use offline just before starting and I do have b...
Given the following table in SQL Server 2005:
ID Col1 Col2 Col3
-- ---- ---- ----
1 3 34 76
2 32 976 24
3 7 235 3
4 245 1 792
What is the best way to write the query that yields the following result (i.e. one that yields the final column - a column containing the minium...
When I try to create a a new snapshot in SQL Server Reporting Services 2005, i get the message: "report history may not be created because the credentials used to run the report are not stored, the report is using user-defined parameter values, default report parameter values are missing, or if a linked report, the link is no longer vali...
Is it possible to select column data using the ordinal_position for a table column? I know using ordinal positions is a bad practice but for a one-off data import process I need to be able to use the ordinal position to get the column data.
So for example
create table Test(
Col1 int,
Col2 nvarchar(10)
)
instead of using
se...
I have a table with doctor offices and doctors in those offices that I'm populating to a repeater control. The data coming back is not aggregated. So, if there are 2 doctors in 1 office, there are 2 rows, same office, different doctor.
Is there a way to aggregate the data so the repeater shows 1 office with all of the doctors from that...
I have the following problem. If I query values with a keyfigure which is a function I can't specify multiple values of the same dimension restriction, but if it is not a function it works.
So this works:
SELECT {[Measures].[Netto]} on columns FROM TDC where
({NonEmpty([Time].[Month].[Month].&[2008-03-01T00:00:00]),
NonEmpty([Time]....