I have a table which displays years (2007, 2006, 2005, etc.) as one of its fields. I need to have it display Year + " and prior" for the last row. Any thoughts on how I might do this? Thanks!
This table is more or less always the same, but from time to time I want to add a new car type, for instance; Car_typeA_5, but this new type must be located under the last register, in the example under ‘Other_Cars_typeC’. So, now the order is wrong, and when I want to display these car types to a web form object, the items will appear wrong ordered.
My question is: To order the values(items) correctly, Where I have to do it? In the web page (ASP.NET) code behind, or somewhere in SQL Server (for example in the Stored Procedure that passes the value to the application)? Or maybe in the same database table..?
I have just installed MS SQL in my computer and I am trying to run MS SQL and Visual studio for the first time. However I have run into a problem that I can't solve. Basically the problem is that the data I fetch from the database is not being displayed/bound to the ddl I have on the page.
I have used VS to configure the sqlDataAdapter, DataSet, sqlConnection, and the sqlCommands. Basically the data is being fetched from the Northwind sample database. From the preview option on the sqlDataAdapter I am able to preview the information from the database. So it seems to work. I have also configured the ddl settings so that the Categories table is the datasource. I have also set the ddl.DataTextField = "CategoryName"; ddl .DataValueField = "CategoryID";
When I compiled and run the page, no error messages are generated, but the ddl is still completely blank and I can't understand why.
We have a SQL Server 2005 database which holds all the companies scanned documents (in image fields). I have developed a report which allows the user to search for a contract and all relevant scanned documents are returned.
When I preview the report with Visual Studio Report Designer...SOME of the images are not displayed, I get the little red cross icon in the top left corner.
When viewed using Report Manager with a browser... The report displays ALL images... However, when I click on the print button and then the print preview button in Report Manager, some of the images do not appear (the same images that don't appear in the Report Designer preview.
Can anyone tell why I can see all the images through Report Manager and my Browser (IE7) but only some of the images when in Report Designer preview or Print Preview?
I have setup Merge replication with 2 publishers and one subscriber. On the subscription machine I can see publisher 1 listed under local subscriptions but not publisher 2. I have created the second subscription on publisher 2 and also tried to create the subscription again on the subscription machine but i get an error saying the 'Subscription already exists'.
Neither do I see the second subscription nor does it work as if it is subscribed to Publisher 2. What could be going wrong.
No se encuentra la secuencia. No se encuentra el identificador de secuencia proporcionado a una operación en la base de datos del servidor de informes. (rsStreamNotFound) Obtener ayuda en pantalla
This is the code
the problem is that I need to know the streamid, and to know the streamid I first have to render the report where the image is to be placed.
I have a stored procedure which uses a column of a table. Unfortunately, the table exists, but the column does not. Still when we create or alter it, it shows 'completed successfully'.
Also, when this script is executed on another server, it gives the respective error, correctly.
Is there any database option or setting which has been tampered or changed by mistake.
Your helpful suggestions are welcome. Thanks in advance.
We set up a few tables while being logged in as a different user. Now, those tables are not accessible via some ASP pages because they aren't DBO-owned tables. Relationships do exist on these tables, but no significant data. Is there a way to change the owner, or do I need to delete the table and start over?
I have created a table on SQL Server from SAS. The table gets created fine. However, the table schema has my user ID in it (AD-ENTmyuserid.Table1). How can I change the schema to dbo.(dbo.Table1)? It's fine if I have to make this change in SQL Server Management Studio.
What the right table setup is when you have a table with values that will never change.
I'm building a small project for our sales team so they can track their leads & customers. I have a table called "Contacts", which contains the names of every prospect they've ever reached out to. In that table is a field called "ContactTypeId", which is a reference to a table called "ContactTypes".
My ContactTypes table looks like this:
ContactTypeId | Name | Description ---------------------------------------------- 1 | Lead | A contact who has shown interest in our service 2 | Qualified Lead | A more deeply engaged, sales-ready contact 3 | Customer | A contact paying for our services
So, I set it up this way because I figured it was cleaner to associate a ContactTypeID# to each Contact in the Contacts table, rather than actually spelling out "Lead", "Customer", etc for each record in the Contacts table.
But is this right? If these values in my ContactTypes table are NEVER going to change, should I still have this table at all or is it better to just insert "Lead", "Qualified Lead", or "Customer" into the Contacts table? Just looking to take the correct approach.
[Microsoft][SQL Native Client][SQL Server]Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Hebrew_CI_AS" in the equal to operation.
How can I change these tables to have the saem collation? I did not purposely make it different.
I am trying to change ownership of a table in my sql database to dbo. I am getting this error "Object 'UserLog' does not exist or is not a valid object for this operation." Here is my script: use ePAC EXEC sp_changeobjectowner 'UserLog', 'dbo' I checked and this is the correct spelling of this table.
I have a table like this : dbo.Table, and I recently create a namespace, and that table belongs there. So I want the table to be created on the new namespace, Namespace.Table, which is not big deal because I can script the table as a Create, and changes the [dbo].[table] to [Namespace].[Table]. But I need to import all the rows already on the old table. How can I achieve that? Thanks
I have verified that myaspx error was due to the owner of the table is not dbo. However, I don't know how to use sp_changeobjectowner to change the table owner to dbo. I even tried sp_changetableowner, but didn't work. SQL Server gave me a hint of '@newowner' parameter; still, I could not get it.
I have a table named "MOTIVE", in this table the primary key is a colum named "MOTIVE_ID". I want to give primary key status to another column named "MOTIVE_CODE" instead. What are the correct statements to drop the primary key from a column and assign it to another.
I have to make a copy of an existing database and call it something different. That part was easy because I simply backed it up and then restored it with a different name.
OrigDbName
Table1 Owner OrigDdName
Table2 Owner OrigDdName
But now I find that all the tables still have the original database name as the owner and I cannot refer to them programmatically unless I use the original database name.
NewDbName
Table1 Owner OrigDdName
Table2 Owner OrigDdName
So how do I change the owner of the tables to the new database name. What I really need is;
NewDbName
Table1 Owner NewDdName
Table2 Owner NewDdName
Please be as specific as possible because I am not a DBA and I am out of my depth once it gets beyond the basics of using commands like Alter Table.
I have the following query where I want to add more user friendly names to the column names that are selected in the query. For instance, I want to display the field Articlegroupname as Product Category. How do I do this ithout altering the underlying field name in the database?
LEFT JOIN HIP.dbo.POHeader ON POHeader.poHeaderId=POLines.poHeaderId LEFT JOIN HIP.dbo.Article ON Article.articleId=POLines.articleId LEFT JOIN HIP.dbo.articleGroup ON Article.articleGroupId=articleGroup.articlegroupid LEFT JOIN HIP.dbo.Articlegroup_2 ON Article.articleGROUPid2=Articlegroup_2.Articlegrou p_2_Id LEFT JOIN HIP.dbo.articleStock ON Article.articleId=articleStock.articleId LEFT JOIN HIP.dbo.Brands ON ARTICLE.BRANDID=BRANDS.BRANDID LEFT JOIN HIP.dbo.Location ON POHeader.locationID=location.locationID LEFT JOIN HIP.dbo.Sesong ON Article.sesongID=Sesong.SesongId LEFT JOIN HIP.dbo.Supplier ON Article.supplierID=supplier.supplierID
I am creating a report in Reporting Services 2000. I have a stored procedure that returns 4 columns with one column having 21 weeks of entries in it. I am using matrix to group these 21 weeks as 21 week columns created dynamically but when I preview the report it is only displaying columns for first 5 weeks.
Any idea why Reporting services is not displaying the rest of the columns? Any limitation on maxiumum number of columns that can be generated dynamically in SSRS 2000?
I have a Sales cube and I want to be able to display Products and the Price at which they were purchased in a given period. I have a Product dimension while Price is a measure in my Sales Fact Table. Is there a way to have a "Group By" aggregation instead of a Sum? This way, I can show Products grouped by their list price.
My Product Dimension consists of product_numbers (such as 100, 101, 102 etc...) My Sales Fact Table consists of sales data (such as product_key, price, net_sales, returns, etc...) at the transaction level.
where Net_sales and Returns are "summed" and Price is simply a "Group By". In other words, this report would show the net sales and returns by product for a given price.
I'd rather not use a Price dimension since we have hundreds of products at hundreds of different prices. Moreover, this data is already in the Sales Fact table.
Create PROCEDURE sp_child2 @inp int, @out int output AS SELECT @out = @inp * 10 GO
In the report screen i want the following:
A text box which will take the @inp(this will come automatically) When i click the "view report" the output value should be displayed in the textbox i have in the report.
But the problem i am facing is with the above sp is its creating two text boxes automatically asking for @inp and @out.If i dont give anything in @out text box and press the view report an error is thrown asing me to fill the output box.
Isnt it supposed to be a output value?Am i doing something wrong?
If i use ODBC to connect to my SQL server some text values are not displayed (I'm using nvarchar and ntext data types). But if I use OLEDB everything works fine.I'm creating a normal table in html. I display an image next to the text. If the text comes before the image it works but if it comes after it doesn't work when using ODBC. Does anyone have any idea on how to solve this problem without changing the html?
Thanks for your help.
J:C:
<body> <% Dim sqlstmt sqlstmt = "select top 3 * from News order by ID DESC" set rs = connection.execute(sqlstmt) %> <table border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="100%" id="AutoNumber7"> <% do while not rs.eof %> <tr> <td width="100%" valign="top"> <div align="left"> <font face="Verdana" size="1"> <a href="news.asp"> <img border="1" src="<%=rs("imagem")%>" align="left" width="32" height="87"> </a>