MAX_LENGTH Field Does Not Match The Value Displayed?
Mar 5, 2007
Hi,
I wonder if anyone can help. I have installed the adventureWorksDW and when I run this query
select * from sys.all_columns where object_id = 85575343 and column_id = 2
The max_length filed value is 50 but if I view the column in explorer view the max_length is 25 I.e. ProductAlternateKey(nvarchar(25) ,null)
I don;'t know if I am looking at the correct table value?
View 3 Replies
ADVERTISEMENT
Nov 3, 2005
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?
SELECT Article.articleId
, Article.articleGroupId
, POHeader.poHeaderId
, POHeader.poHeaderId
, POHeader.supplierId
, POHeader.locationId
, POHeader.deliverydate
, POHeader.poDeliveredValue
, POHeader.poStatus
, POHeader.estTotalValue
, POHeader.receivedTotalValue
, POHeader.poCurrMultiplier
, POHeader.poCurrCode
, POHeader.ourRef
, POHeader.yourRef
, POHeader.poComment1
, POHeader.poComment2
, POHeader.UserId
, POHeader.poCurrFactor
, POHeader.InternalExternal
, POHeader.CompanyId
, POHeader.CustKeyIn
, POLines.poLineId
, POLines.poHeaderId
, POLines.articleId
, POLines.orderQty
, POLines.receivedQty
, POLines.articleCost
, POLines.poLineStatus
, POLines.newPrice
, POLines.receiveddate
, POLines.UserId
, POLines.spesArticle
, POLines.invoicedPrice
, POLines.invoicedValuta
, POLines.invoicedNOK
, articleGroup.ArticleGroupName
, articleGroup.exportAccount
, articleGroup.exportDept
, Articlegroup_2.g2_name
, Article.abc_code
, Article.articleName
, Article.articleStatus
, Article.articleUnit
, Article.stockInfoId
, Article.suppliers_art_no
, Article.tex_color
, Article.tex_quality
, Article.tex_size_id
, Brands.brandLabel
, Location.locationName
, Sesong.Sesongnavn
, Sesong.sesongutgaatt
, Supplier.name
FROM HIP.dbo.POLines POLines
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
View 1 Replies
View Related
Jun 10, 2004
How can I make my search button have the "Any part of field" match as a default? with a simple query...
I have a field in MS access with hundreds of words (cv)... I want to be able to find a word in "Any part of field"
my try:
WHERE ((([cv].[detail cv])=[detail]));
detail is nowhere to find... i am prompt to give a value. fine.but it
equals whole field; detail must be the sole value of the field detail cv...
help!
mchel
View 7 Replies
View Related
May 14, 2007
hi..i'm new in sql progaming,i try to make make a query that in table field "match" return to "1"if no member record in another table and return to "0" if there is anyrecord member :extable member:member idA 12B 14Table Incoming.member note matchC bla..bla 1A bla..bla 0D bla..bla 1...... ....... .....can anyone help me please?D
View 3 Replies
View Related
Oct 31, 2013
I need some store procedure script , from two table i want to pickup matching field and insert into main table ,give some sample store procedure coding...
If 1st table as cheque no and 2nd table as cheque no - matching then data would be inserted in to main table using two table...
View 2 Replies
View Related
Jan 12, 2006
I have a customer who wants to SELECT records based on a partial match in atext field. For example, in a list of telephone numbers they want to searchfor all records that contain the digits '777' in any part of the string. Howdo I formulate such a query?Many thanks.
View 2 Replies
View Related
May 15, 2008
If I have a column named "Login" in a SQL Table (I am sharing with another application) that I am using a stored procedure to acquire the information from, how can I trranspose its name to match code already written in a Web App to get the data.
There is a web app already created that has the followig code to get the data from the database
Dim strSQL ast string = "UsersSelectCommand"
intLoginID = objDataReader("LoginID")
My stored procedure is the following:
CREATE PROCEDURE UsersSelectCommand/* ( @parameter1 datatype = default value, @parameter2 datatype OUTPUT )*/AS Select Lastname, FirstName, Login from Users Order by LastName
GO
The stored procedure will return "Login" instead of "LoginID" that I am wanting. How can I modify the Stored Procedure to change the LoginID to Login.
View 2 Replies
View Related
Jul 20, 2005
Right this has to be a Micro$oft mess-up surely...?I'm running SQL 2k standard with SP3. I have a table which I'm tryingto query using a LIKE operator on a varchar field as follows....WHERE dbo.tbl_pm_projects.SeniorManagerID LIKE '%'....In actual fact the % is passed in by the application when the userselects "All managers" from the drop down list used to select theManager to filter by. If they select a manager's name from the listit becomes LIKE 'ajames' or whatever.BUT - the table currently contains 2972 records. If I take out theWHERE clause the SELECT returns all records - fine - but if I put thewhere clause in it returns only 1682!! I thought the % was meant tomatch, and I quote the SQL server Books Online files here; "Any stringof zero or more characters." Anyone explain to me whats going onhere?TIANiall
View 12 Replies
View Related
Aug 1, 2007
Could anyone help of how to match the exact characters in a data field in SQL 2005 Developer.
For example, if one has a password "GooD", then when he or she enters "GOOD", "good", etc, the database will not match the password. And he or she must enter the exact characters, which is "GooD".
Thanks.
View 2 Replies
View Related
Aug 1, 2007
Could anyone help of how to match the exact characters in a data field in SQL 2005 Developer.
For example, if one has a password "GooD", then when he or she enters "GOOD", "good", etc, the database will not match the password. And he or she must enter the exact characters, which is "GooD".
Thanks.
View 3 Replies
View Related
Nov 10, 2005
Hi,
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.
Does anybody know how I can solve this?? :s
View 3 Replies
View Related
Jul 19, 1999
When using sp_who and sp_who2 on SQL Server 6.5 I seem to get inaccurate results .
Each spid seems to be using the same host name, and the host name used is one that hasn't been connected to SQL server for several months.
Is there a problem with the connection management ? If so how do I find this out ? and how do I fix it ?
View 2 Replies
View Related
Jan 4, 2007
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?
Any help would be appreciated.
View 1 Replies
View Related
Feb 23, 2007
Hi,
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.
I would appreciate any help.
Thanks
tribal
View 5 Replies
View Related
Jun 12, 2006
1. I am using the webservice to render the images from a report, and they dont render.
I paste this URL to the browser
http://agamenon:90/ReportServer?%2fGescomRpts%2fRPT_MediosDesarrollo&rs%3aFormat=HTML4.0&rs:ImageID=6c809239-753f-4988-abcf-231416dff0d6
and I get this
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.
This is the page getimage.aspx
protected void Page_Load(object sender, EventArgs e)
{
string reportPath = Server.UrlDecode(Request["report"]);
//string streamID = Request["streamid"];
ReportExecutionService rs = (ReportExecutionService)Session["rs"];
DataSourceCredentials[] credentials = null;
string showHideToggle = null;
string encoding;
string mimeType;
string extension;
Warning[] warnings = null;
ParameterValue[] reportHistoryParameters = null;
string historyID = null;
string[] streamIDs = null;
ServerInfoHeader sh = new ServerInfoHeader();
rs.ServerInfoHeaderValue = sh;
byte[] result = null;
ParameterValue[] reportParameterValues2 = null;
string deviceInfo = "<DeviceInfo>" +
//"<StreamRoot>" + streamRoot + "</StreamRoot>" +
"<Toolbar>False</Toolbar>" +
"<Parameters>False</Parameters>" +
"<HTMLFragment>True</HTMLFragment>" +
"<StyleStream>False</StyleStream>" +
"<Section>0</Section>" +
"<Zoom>" +
"</Zoom>" +
"</DeviceInfo>";
result = rs.Render("HTML4.0", deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
string streamID = streamIDs[0];
string encodingImage;
string mimeTypeImage;
byte[] image;
ParameterValue[] pv = (ParameterValue[])Session["reportParameterValues"];
//image = rs.RenderStream(reportPath, "HTML4.0", streamID, null, null, pv, out encodingImage, out mimeTypeImage);
image=rs.RenderStream("HTML4.0", streamID, null, out encodingImage, out mimeTypeImage);
Response.Clear();
Response.ContentType = mimeTypeImage;
Response.AppendHeader("content-length", image.Length.ToString());
Response.BinaryWrite(image);
Response.Flush();
Response.Close();
}
and this is the page of the report. Sorry for the long code.
if (reportCanBeRendered)
{
string deviceInfo;
string streamRoot;
Session["rs"] = rs;
streamRoot = ("getimage.aspx?report="+ (path + "&streamid="));
switch (format)
{
case "HTML4.0":
case "HTML3.2":
deviceInfo = "<DeviceInfo>" +
"<StreamRoot></StreamRoot>" +
"<Toolbar>False</Toolbar>" +
"<Parameters>False</Parameters>" +
"<HTMLFragment>True</HTMLFragment>" +
"<StyleStream>False</StyleStream>" +
"<Section>0</Section>" +
"<Zoom>" +
"</Zoom>" +
"</DeviceInfo>";
break;
default:
deviceInfo = "<DeviceInfo></DeviceInfo>";
break;
}
// SQLRS-ReportViewer
if (!(reportParameterValues == null))
{
//reportParameterValues2 = reportParameterValues.ToArray(typeof(ParameterValue));
//reportParameterValues2 = (ParameterValue[])reportParameterValues.ToArray(typeof(ParameterValue));
}
DataSourceCredentials[] credentials = null;
string showHideToggle = null;
string encoding;
string mimeType;
string extension;
Warning[] warnings = null;
ParameterValue[] reportHistoryParameters = null;
string historyID = null;
string[] streamIDs = null;
ServerInfoHeader sh = new ServerInfoHeader();
rs.ServerInfoHeaderValue = sh;
byte[] result = null;
ParameterValue[] reportParameterValues2 = null;
result = rs.Render(format, deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
streamRoot = "getimage.aspx?report=" + path + "&streamid=" + streamIDs[0];
//string reportPath2 = Server.UrlDecode(Request["report"]);
//string streamID = streamIDs[0];
////string streamID = "";
//ReportExecutionService rs2 = new ReportExecutionService();
//Session["rs"] = rs;
//rs2=(ReportExecutionService)Session["rs"];
//////ReportingService rs = (ReportingService)Session["rs"];
//string encodingImage;
//string mimeTypeImage;
//byte[] image;
//ParameterValue[] pv = (ParameterValue[])Session["reportParameterValues"];
//////image = rs.RenderStream(reportPath, "HTML4.0", streamID, null, null, pv, out encodingImage, out mimeTypeImage);
//image = rs2.RenderStream("HTML4.0", streamID, null, out encodingImage, out mimeTypeImage);
//Response.Clear();
//Response.ContentType = mimeTypeImage;
//Response.AppendHeader("content-length", image.Length.ToString());
//Response.BinaryWrite(image);
//Response.Flush();
//Response.Close();
// store ReportingServices and parameters object is session layer in case we need it for image streams
Session["rs"] = rs;
Session["reportParameterValues"] = reportParameterValues2;
switch (format)
{
case "HTML4.0":
case "HTML3.2":
System.Text.Encoding enc = System.Text.Encoding.UTF8;
// get the report as a string
string tmpReport = enc.GetString(result);
// replace all occurrences of report server link with current page link
tmpReport = tmpReport.Replace(reportServerURL.Replace("/ReportService.asmx", "?"), ("http://"
+ (Request["SERVER_NAME"]
+ (Request["SCRIPT_NAME"] + "?Report="))));
ReportPlaceholder.InnerHtml = tmpReport;
break;
default:
Response.ClearContent();
Response.AppendHeader("content-length", result.Length.ToString());
Response.ContentType = mimeType;
Response.BinaryWrite(result);
Response.Flush();
Response.Close();
break;
}
}
View 4 Replies
View Related
May 22, 2008
This is a situation I haven't handled before.
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.
View 2 Replies
View Related
May 4, 2006
Hi,
What I mean is:
I have a decimal(19,10) variable called @value and it has the value 66.6666666666
I can round it using ROUND(@value, 0) and the result is 67.000000000
But what I really want is to get rid of all the zero's and the decimal point so that I end up with just 67
Thanks in advance,
Ian.
View 6 Replies
View Related
Jul 23, 2015
All of a sudden my user variables are not displayed.
I know that they exist because the package run is successful.
For better, quicker answers on T-SQL questions, click on the following...
[URL]
For better answers on performance questions, click on the following...
[URL]
View 4 Replies
View Related
May 27, 2008
Hi Guys,
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?
Any help will be highly appreciated.
View 3 Replies
View Related
Sep 27, 2007
Hello,
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.
I want to be able to view the data like this:
Price Net_sales Returns
Product
100 $5.99 $2005 $320
101 $3.51 $7110 $998
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.
Thanks for any help provided
View 1 Replies
View Related
Oct 4, 2007
Hi,
I have a sp like this:
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?
please help...
View 1 Replies
View Related
May 8, 2007
Hi.
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>
<a href="news.asp"><br>
<%=left(rs("news"),100)%>(...)
</a>
</font>
</div>
</td>
</tr>
<%
rs.movenext
loop
%>
</table>
</body>
View 5 Replies
View Related
Jul 5, 2007
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!
View 3 Replies
View Related
Mar 21, 2007
Hi,
I'm running the following query against a SQL Server 2003 database to receive the results below:
SELECT PayPeriod AS [Pay Period], SUM(PayHours) AS [Pay Hours]
FROM EmployeePayHours
GROUP BY PayPeriod
Pay Period Pay Hours713 80
714 120
717 59.5
718 80
719 80
A colleague of mine, however, is running the same query against the same database (using a different machine) and gets the following results.
Pay Period Pay Hours
713 80
714 120
717 59.500000000000021
718 79.999999999999972
719 79.999999999999972
Is there a setting somewhere that needs to be changed? Thanks.
View 1 Replies
View Related
Dec 19, 2006
Hi,
I have scheduled subscriptions for a report which has an image in it.
The report is subscribed to be saved in a Report Server File Share in HTML format.
When i open the saved report i see a placeholder x instead of the image.
When i change the subscription format to ADOBE pdf it works fine.
Has anyone faced this problem ?
Any help on this is appreciated.
Thanks
Sam
View 5 Replies
View Related
Mar 16, 2007
Hello everyone,
I have a Reporting Services report which must show photographs stored in a SQL Server database. The trouble is that the photos just don't display. The report just shows the little red cross icon.
When I use MS-Access forms and reports it works fine. But I need this to work with Reporting Services!
Help please!
Jerome
View 4 Replies
View Related
Jun 18, 2007
Config: SQL 2005 hosted from IIS.
I had a set of working reports on a test server that we are moving to the production box. One of these reports has web based embedded images which are pulled from share point (2003).
DomainSSRSAcctName is the account for:
The application pool for the web site with
eports and
eportserver virtual directories.
the SSRS and SQL service account
The SSRS Unattended Execution account
This account has read access to the SPS 2003 document library. I have verified this by using the account in IE to browse to the folder.
When I view this report from the production server I get a broken image link and not the image. I don't see any errors in the eventlog or the SSRS logs.
Any ideas why this isn't working?
Thanks,
-p
View 7 Replies
View Related
Jul 3, 2007
HiI'm not sure if this is a .net or a SQL issue. My development machine is using SQL 2005 while the live server is SQL2000. I have a smallmoney field in the database for holding a house rent. The following is used to display the contents on the page<asp:Label ID="lblrent" runat="server" Text='<%# Bind("rent", "(0:0.00)") %>'></asp:Label>In development, the number is displayed correctly, with the decimal place, .e.g. 200.50 but on the live server the number is displayed as 20050,00. What I have noticed in the database is that the number is held differentlySQL 2005 - 200.5000SQL 2000 - 20050Is there a difference between SQL 2000 and 2005? How do I get around this problem?
View 6 Replies
View Related
Nov 26, 2007
I have a website that works OK on my local machine when I test it within Microsoft Visual Studio's debugging mode. However now that I have copied it over to a remote server it is failing with an error message of:An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that under
the default settings SQL Server does not allow remote connections. (provider:
SQL Network Interfaces, error: 26 - Error Locating Server/Instance
Specified)As far as I'm aware I have never used SQL Server with my webpage. All connections to databases are to Oracle with connection strings and providers set up in the webconfig file. The website does however use a login control to recognise authorised users. Does this mean I've unknowingly been using SQL Server (to support the login control) and I therefore need to install this on the remote machine? Or is it something simpler? Wondered if anybody had seen this error message before?
View 4 Replies
View Related
Jan 6, 2015
I have data as below, I want the indicator to be displayed by using timestamps
Id task_id tsk_complete_ts task_due_date Id_end_ts tsk_indicator id_indicator
50 2001 01-01-2015 02-01-2015 10-01-2015 GREEN
50 2002 03-01-2015 04-01-2015 10-01-2015 AMBER
50 2003 07-01-2015 06-01-2015 10-01-2015 RED
50 2004 NULL 09-01-2015 10-01-2015 GREEN
I need to calculate the indicator for the whole id considering all the tasks by using the below conditions,
1) if tsk_complete_ts > id_end_ts, display id_indicator as RED
2) if any task is in RED or AMBER and id got completed before id_end_ts, the display id_indicator as AMBER
3) Else GREEN
I want the id_indicator to be populate dynamically in view without using stored procedure, id_indicator should be common for whole id.
Task indicator also getting populated in the view using the case statement.
View 1 Replies
View Related
Jan 20, 2015
I have table
CREATE TABLE [dbo].[tblreg]
(
[RN] [nvarchar](50) NOT NULL,
[SC] [nvarchar](6) NULL,
[DC] [nvarchar](12) NULL,
[code]....
So when i write a select query i want the NULL Values should be displayed as zero in the output.
View 1 Replies
View Related
Jan 29, 2008
My regional settings are set to the UK on the server and local machine. Does anyone know how to get SSRS displaying dates in DD/MM/YYYY format?
I have googled it, but just can not seem to find the answer.
View 9 Replies
View Related
Jul 20, 2005
I have a problem trying to get a value from textbox 1 and textbox 2.If those two values match the data in the database then it has toreturn a third corresponding value to a third textbox (or label) aftera user clicks a submit button. Basically, I am trying to allow usersto enter a value of weight in pounds in textbox 1 and a zip code intextbox 2 then pulling the shipping amount from a courier's databaseand returning that dollar amount to a third textbox or label afterthey click submit. How would I write this code in vb.NET?Thanks,TG
View 1 Replies
View Related