Data Not Showing In MS Query But It Is In The Sql Server Db ...

Sep 28, 2007

Hello all,



I have a simple query "Select distinct batch_id from batch WHERE batch_id = 123 or batch= 345



I run this query in MS query on the proper db and it gives me nothing.

I run the same query in the sql server console and the data is there.



As mentioned I am on the proper db since it works fine for some of my batch_id's for the 2 most recent one !!!??? They are in the db but I cant select them ....


Any idia ?

View 4 Replies


ADVERTISEMENT

Select Query - Showing Columns Data Row Wise

Dec 28, 2011

I have get 3 columns in a select query. how can show these 3 columns in row wise.

View 2 Replies View Related

Linked Server Data Not Showing

Sep 3, 2014

I have a linked server that was built on PostgreSQL database connection. When I try to query one of the tables in the linked server it is giving attached error.

View 1 Replies View Related

SQL Server 2012 :: Query Execution Not Showing Up In Profiler Trace

Aug 22, 2014

Set up a trace with the events RPC:Completed, SQL:BatchCompleted, SQL:BatchStarting, and SQL:StmtCompleted.

When I issue the statement: SELECT * FROM XyzView there is nothing captured in Profiler. If I script out the view and then execute the select statement that defines the view, it does show up in Profiler.

I've tried adding a lot of the other events, i.e. SP:StmtCompleted and the various other StmtStarting events and the trace still does not capture anything.

Am I capturing the wrong events or is this known behavior? My goal is to see what the overhead is for using a view versus persisting the results of the view as a table and referencing that instead. The view in question is against static data, joins 9 tables, and is referenced a lot.

I can use the stats generated when I execute the select that defines the view but I still find this to be curious behavior so I assume I'm doing something wrong.

View 9 Replies View Related

SQL Server 2008 :: Balance Sheet Query Showing Wrong Amounts On VAT Accounts Only

May 21, 2015

I have one query which is pulling Balance sheet amounts from SAP Business One database. The query is giving the correct figures for the rest of the accounts except for the VAT Input refundable account 123600 and VAT Output Payable account 221400. The query sums up totals at Title account level(FatherNum) and the above accounts are the title accounts:

SELECT CAST(T0.TransId AS Varchar(30)) AS TransId, CASE WHEN t3.FatherNum IN ('100000', '350000') THEN '-3 OK' ELSE CAST(T0.TransType AS Varchar(30))
END AS TransType, CAST(T0.BaseRef AS VarChar(30)) AS BaseRef, T0.RefDate,T0.Number as Docnum, DATEPART(Month, T0.RefDate) AS JrnMonth, T0.FinncPriod, T1.Account, T1.Debit,
T1.Credit, T1.Debit - T1.Credit AS JrnAmt, ISNULL(T1.SYSCred, 0) AS SysCred, ISNULL(T1.SYSDeb, 0) AS SysDeb, T1.ShortName, T1.Ref1, T1.Ref2,

[code]....

View 8 Replies View Related

Reporting Services :: SSRS Export To Excel Showing Data Type As General For All Data Types

Sep 16, 2015

One of my report has different data types like decimal,percentage and integer values.

When I exported the report to excel , all the values are showing as "general" data type.

How to get excel data type same as ssrs report data type by default when exported to excel?

View 2 Replies View Related

Query Showing Tablesize In MB

Jul 5, 2004

Hello all,

Is there an SQL query that can be run against a database that displays both the number of rows and the physical size of the tables in that database?

I'm basically after the information displayed in Taskpad view >> Table Info, but in an easy to manipulate and publish format.

Thanks for your time.

View 5 Replies View Related

Query Not Showing All The Records?!

Feb 8, 2008

I want to have all the ethnicities from the Ethnicgroup table to be displayed in a particular area which is in where clause as
aggcourseid

The problem is that even when I have a left join on the EthnicGroup table it will not return all the ethnicities but will only return those who were existing in that particular aggcourseid.

i.e. If there is no African student in E2, it will not show up in the result whereas I want to display all the ethnicities and if there is no record for aggcourseid, it should show up as 0/NULL for that ethnicity.

I have tried all sorts of joins but the problem is whenever I put in the aggcourseid in where clause, it wont bring all the records


declare @mpid char (13)


set @mpid = '011142'

create table #temp_et (
[Year]int NOT NULL,
[Ethnicity] varchar(20),
[Starts]float(4),
[Success]float(4),
[Retention]float(4),
[Achievement]float(4)
)

--Year 05/06
insert into #temp_et
select
CAST(LEFT(pv.pg_expendyrid,2) AS int)[Year],
eg.pg_ethnicgroupname[Ethinicity],
sum([pvstart]) [Starts],

(case when sum(pvstart) = 0 THEN 0 Else convert(decimal(6,3),(sum(pvach)*1.00)/(sum(pvstart)*1.00)*100)end)[Success],
(case when sum(pvstart) = 0 THEN 0 Else convert(decimal(6,3),(sum(pvcomp)*1.00)/(sum(pvstart)*1.00)*100)end)[Retention],
(case when sum(pvstart) = 0 THEN 0 Else convert(decimal(6,3),(sum(pvach)*1.00)/(sum(pvcomp)*1.00)*100)end)[Achievement]
--into temp_et
from [FECAS].Proachieve.dbo.pv_midpoint pv
left join [FECAS].Proachieve.dbo.GN_AggCourseStructure gn on pv.pg_aggcourseid = gn.pg_aggcourseid
left join [FECAS].Proachieve.dbo.PG_ethnicGroup eg on pv.pg_ethnicgroupid = eg.pg_ethnicgroupid

where pv_midpointid = @mpid
and pg_expendyrid = '05/06'

and pv.pg_aggcourseid LIKE 'E2%'

group by
eg.pg_ethnicgroupname,
pv.pg_expendyrid
order by
eg.pg_ethnicgroupname

View 14 Replies View Related

Reporting Services :: No Data Showing When There Is Data

Nov 25, 2015

I created a report in Reporting Services which was working. Then I filled in the "No Rows" section in the properties of a tablix in the report. Now it shows the No Rows message even if there is data.  If I open the Shared Dataset that is used in the report and open Query Designer and run the query I get data.

View 11 Replies View Related

Creating A Query Showing File Not Existing

Jan 16, 2008

This is a SQL question while using Microsoft SMS.

I am trying to write a SQL query looking for a specific file in a specific directory. If the File does not exist, then I want it to display.

here is the Code that I have for it that shows that the file exists... how do I make it show that the file doesn't exist?... what am I doing wrong?

Thanks for all your help in advance!

**********************************

SELECT TOP 100 PERCENT SYS.Netbios_Name0, SYS.User_Name0, SF.FileName, SF.FileVersion, SF.FileSize, SF.FileModifiedDate, SF.FilePath,
SYS.Operating_System_Name_and0
FROM dbo.v_GS_SoftwareFile SF INNER JOIN
dbo.v_R_System SYS ON SYS.ResourceID = SF.ResourceID
WHERE (SF.FileName = 'UdaterUI.exe')
AND (SF.FilePath = 'C:Program FilesMcAfeeCommon Framework')
OR
(SF.FileName = 'UdaterUI.exe')
AND (SF.FilePath = 'c:Program FilesNetwork AssociatesCommon Framework')
ORDER BY SF.FileVersion, SYS.Netbios_Name0

View 1 Replies View Related

SQL Data Not Showing In Label

Mar 13, 2008

Here is my code.  Basically what I am doing is selecting from the database based on the current user.   The ReaderResults.Text label is not showing the info pulled from the database, and the ReaderError.Text label is not showing an error.  I also tried putting the ReaderResults.Text label inside the loop and that didnt work. Any suggestions?
'Database ConnectionDim con As New SqlConnection("Data Source = .SQLExpress;integrated security=true;attachdbfilename=|DataDirectory|ASPNETDB.mdf;user instance=true")Dim currentUserID
currentUserID = Context.User.Identity.Name.ToString()
Label1.Text = currentUserID
Dim selectSQL As String
selectSQL = "SELECT companyKey FROM Company WHERE UserID = ('" + currentUserID + "')"Dim cmd2 As New SqlCommand(selectSQL, con)
Dim reader As SqlDataReaderDim CompanyKey
Try
con.Open()
reader = cmd2.ExecuteReader()Do While reader.Read()
CompanyKey = reader("CompanyKey").ToString()
Loop
reader.Close()Catch err As Exception
ReaderError.Text = "Error selecting record."
ReaderError.Text &= err.Message
ReaderResults.Text = CompanyKey
Finally
con.Close()
End Try

View 1 Replies View Related

SQL Data Not Showing Up In My Label

Mar 13, 2008

The ReaderResults.Text is not returning a value.  I am not sure what is going on because the table and all columns are full, Label1.Text shows the current username of the user loggedon, and no error is showing up in ReaderError.Text.  Anyone have any ideas?
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Database ConnectionDim con As New SqlConnection("Data Source = .SQLExpress;integrated security=true;attachdbfilename=|DataDirectory|ASPNETDB.mdf;user instance=true")
'Job1 InfoDim currentUserID
currentUserID = Context.User.Identity.Name.ToString()
Label1.Text = currentUserID
Dim selectSQL1 As String
selectSQL1 = "SELECT companyKey FROM Company WHERE UserID = ('" + currentUserID + "')"Dim cmd1 As New SqlCommand(selectSQL1, con)
Dim reader As SqlDataReaderDim CompanyKey
'Job1 Select
Try
con.Open()
reader = cmd1.ExecuteReader()Do While reader.Read()
CompanyKey = reader("CompanyKey").ToString()
Loop
reader.Close()Catch err As Exception
ReaderError.Text = "Error selecting record."
ReaderError.Text &= err.Message
ReaderResults.Text = CompanyKey
Finally
con.Close()
End Try

View 3 Replies View Related

Showing Data For All Months

Apr 3, 2008

I have a Report Parameter Non-queried list for all months (Labels January, Februari... and Values 01,02...).
When I pick a month in my report all works fine
But I would also like to have data for the complete year (via an All selection)
How should I get this done . Any help appreciated
Edwin

View 4 Replies View Related

Showing Last Entry For Unique Data

Nov 23, 2007

hey folks,

i am looking for code to show the last entry of a database that has a unique field. for eg.. i have columns AREA, NAME, NUMBER. i need to show the last entry for each unique area.
so if there was 5 seperate areas, the table would show the last five entries for each area. anyone help?

View 6 Replies View Related

All Output Data Not Showing In Excel

Jun 24, 2014

I have this script which outputs a combination of financial data. I have recently joined a table that includes a narrative and when I run the query, it runs perfectly. However, when I copy and paste the output into Excel, not all the data is showing. After the process of elimination, it is because Excel doesn't like the narrative column and not all data is copied across which is very annoying. If I remove the narrative column, then all the data copies over correctly.

I am using Excel 2010 which is quite up-to-date.

View 3 Replies View Related

Graph(Chart) Showing Data

Apr 28, 2006

Hello

I am making the switch from using MSACCESS to do required reporting to using Reporting Services to accomplish the same tasks.

A requirment I have is that whenever a graph (chart) is created, it contain the underlying data in a connected and aligned data table. MSACCESS allows this by selecting the chart options and then "show data table".

Is this ability included in Reporting Services in MS Visual Studio 2003 .NET? If so, how can I enable it? I currently can only enable the legend.

Currently we are using:

SQL Server 2000 (sp3a)
Reporting Services (sp2)
Visual Studio .NET 2003

Thanks for any and all help.

Ben

View 5 Replies View Related

SQL Data Source Not Showing Any Connection Strings

Mar 21, 2007

Everything is set up the way it should be, as far as we can tell.
However, when we drop in a SQL data source and try to configure, it, we
get a blank box for choosing the connection string, and it won't let us
make a new one.

Has anyone encountered this before? If so, how can we fix it?

View 1 Replies View Related

Only Showing Previous Day Data Based On Varchar?

Dec 2, 2014

I'm trying to only show yesterday's data based on a date that is stored as a varchar. I converted it to smalldatetime but I'm getting an error that says "Conversion failed when converting date and/or time from character string." I don't know how I have to alter the conversion.

Here is my code:

CONVERT(varchar(20), CONVERT(date, CONVERT(varchar(8), date_added), 112),110) = dateadd(day,datediff(day,1,GETDATE()),0)

View 10 Replies View Related

Transact SQL :: VARCHAR (MAX) Not Showing Full Data

Nov 11, 2015

I created a procedure called 'Longtextprocedure'. The length of this procedure is 650000 characters long. When I was giving the following query - select len(routine_definition) from INFORMATION_SCHEMA.routines where ROUTINE_NAME = 'Longextprocedure'; Length is showing as '4000' characters long. It is not showing the remaining part of the procedure, it is showing upto the 4000 characters of procedure code. But when you execute the procedure(exec 'Longtextprocedure') it is showing the exact result. 

My question is i want to read all the 650000 characters long procedure code{select routine_definition from INFORMATION_SCHEMA.routines where ROUTINE_NAME = 'Longextprocedure'} to a variable which is varchar(max). 

When i am trying to read the whole procedure code it is taking 4000 characters of data into the variable not the whole. Is there a way to read the huge procedure code into the variable?

Code:- 

CREATE PROCEDURE FAKEPROCEDURE @procName VARCHAR(50)   --@procName is 'Longtextprocedure'
AS
BEGIN
DECLARE @routineDefinition VARCHAR(MAX);
DECLARE @replaceToChar VARCHAR(MAX);

[Code] ....

When i am trying to execute the line EXEC(@dupliacteRouteDef), it is showing like there is no procedure defined. This is due to '@dupliacteRouteDef' variable is having 4000 characters of data not the whole data. Is there a way to read whole procedure data into the variable irrespective of the length of the string?

View 3 Replies View Related

Showing Data Based On The User Logged In.

Feb 25, 2008

Assume I have a heirarchy like the following:

- John Smith

- James Jones
- Robert Allen

- Lisa Andrews
- Bob Thompson

Now, I have a report where whoever is logged in will only see data for themselves and those below them, so John Smith would see everyone including himself, but Lisa Andres would only see herself and Bob Thompson. James Jones would be able to see everyone except John Smith.

How do I go about implementing this code, for example in an asp.net page where one of the user's logs on to view the report. Currently, there is a T-SQL function that creates a user heirarchy table, but it is very slow and I am curious if SSRS 2005 has any new capabilities in handling this.

Thanks,
Saied

View 3 Replies View Related

New Data Source Showing Only Default Instance

Dec 27, 2006

I have two instances in SQL on my machine. When creating a New Data Source in BIDS, I can only see the default instance. I have checked the SAC manager to make sure the second instance allows remote connections and the setting are exactly the same as the default. Any ideas? Thanks.

View 4 Replies View Related

Need Report Also Showing Months Even When No Data For That Month

May 13, 2008

Hi All,

would like to make a report with sales figures per month even is there are no sales figures that month.
Report should still show the month.

Any help to get me started in the wright direction much appreciated

edwin

View 1 Replies View Related

Data Mining :: Showing Only Few Tables In The Database?

Aug 12, 2015

I have a database available and it is in live production.

I want to show only three tables in the front end. asp.net application in dropdown menu. I checked the internet and found only query for seeing all the tables from the DB.

View 3 Replies View Related

Transact SQL :: Join Tables To Get Result - No Data Showing

Aug 18, 2015

I am tying to join tables to get the result but it is not showing any data,i have shipping address column in both tables I want to show data in single column I don't know how to display.

select r1.ProductID,r1.ProductName,r1.PMNO ,r.ShippingInfo,r.ShippingAddress ,rs.ShippingAddress from R2InventoryTable r1 inner join RecycleComponents1Table r on r1.ProductID=r.ProductID
inner join
ReSaleorReStock1Table rs on r1.ProductID=rs.ProductID
where r1.HazMat='No' order by ProductID

If I join two tables it is showing data

select r1.ProductID,r1.ProductName,r1.PMNO ,r.ShippingInfo,r.ShippingAddress from R2InventoryTable r1 inner join RecycleComponents1Table r on r1.ProductID=r.ProductID

where r1.HazMat='No' order by ProductID

View 9 Replies View Related

Grid And Details View Not Showing Remote Database Data

Oct 27, 2006

hi,i have an sql database on my server on the world wide web.i can make a connection  to the database in visual web developer and all the tables etc are shown in the 'database explorer' of visual web developerwhen i make the query in visual web developer it does retrieve the data froom the remote server database when i 'test query'.... so looking great!the connection string in the webconfig file is left as the default when i run the prgram on my LOCAL HOST with the inbult server that comes with visual web developer it runs fine......so.....running on my local pc it will connect to the database on my www host server and does display the data from that database.i need to change the webconfig files path to the connection  by default it is |DataDirectory|if i change this to the path i suspect is correct as this is the connection i use to the database  C:Inetpubvhostsarcvillage.comhttpdocsApp_DataTestdatabase.mdfwhen i change the path in webconfig then it stops working on my localhost and the error when i ftp it to my host is:Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. any ideas? 

View 2 Replies View Related

Power Pivot :: Not Showing Data Because It Is Not Clear How These Fields Are Related

Apr 1, 2015

Purpose - relate Server to Software, and Server to App and display it in power view.Current State - I am able to display that Server/Software and Server/App combos separately in power view.  However when I add Server/Software/App it throws the warning as seen below.  This leads me to believe the relationships aren't transitive so to speak.

Supporting Info - v_gs_installedsoftware is the software table.  It relates to v_r_system which is the server table through resource id.  The software table can have many rows with the same resource id, however the server table only has unique resourceids (think of it as a server can have many software products installed).  Table1 is the application table, it relates to the v_r_system table through the resourceid.  Each server from the server table can have many applications that it actually plays a role in (think of a web server that hosts multiple websites for different business units).

View 3 Replies View Related

Multipage Report Repeat Header Not Showing Data From Page 2 Onwards

Mar 13, 2008



I am using reportitem to show the data in the header from a table cell.i see the values just on the first page, from second page onwards reportitems not showing the values at all.

I am getting the reportitems values from a tables header cell and also made the tables header cell's property checked repeat header in all pages.

Header is appearing but the values in reportitems are not populating from page 2 onwards.

i tried / used everything including inserting group header still i don't get it towork.

please help.......................

View 1 Replies View Related

Integration Services :: SSIS Balanced Data Distributor Control Not Showing In VS

Oct 25, 2015

I installed the Feature Pack Balanced Data Distributor control on my PC to use with SQL Server 2014 64 bit.  I have used the control with SQL Server 2014 and SSDT so I was familiar with the process. Unfortunately, I cannot get the control to appear in the toolbox. No error messages appear, BDD just doesn't appear in the toolbox.  I have tried un-installing, reinstalling, installing SQL Server 2014 SP1, installing again, rebooting a number and nothing works.  The control just does not appear in the toolbox. It doesn't not appear when I go to choose items either. What does it take to get BBD to appear in the SSIS Toolbox for VS?

View 2 Replies View Related

Analysis :: Browsing Measure Via Fact Dimension Showing Incorrect Data?

Sep 6, 2011

I have a Fact table that contains several degenerate string values that I have pulled into a Fact Dimension.

When I browse the cube and cut one of the measures by an attribute from the Fact Dimension, I am getting incorrect data.

In other words, when I query the fact table directly via SQL and apply the same filters, I see the data I am expecting to see. But cube browse with same filters yields different results.

How can this happen since the fact dimension has a 1:1 relationship with the fact table.

I do have the Dimension Usage configured properly.

Is this an aggregation thing? Attribute key thing? What am I missing?

View 3 Replies View Related

Analysis :: SSAS LastnonEmpty Not Showing Data For Entire Time Hierarchy?

Jun 8, 2015

I have a time dimension which has Date, Week, Month and Year. However, the hierarchy will have only Week, Month and Year. It works great for any Sales measure with AggregateFunction as SUM.

I have created a new measure with AggregateFunction = LastNonEmpty. Also in the backend, I have pushed all the inventory data to last date in every month as inventory is always looked on a monthly basis not on a weekly basis. This measure shows correct data for every last week of the month in the hierarchy. However, Months and Years are displayed as zeros.

what I am doing wrong.

View 8 Replies View Related

Reporting Services :: SSRS 2012 - Scatter Chart Isn't Showing All Data Points

Jul 27, 2015

I have a scatter chart in SSRS (SQL Server 2012, Visual Studio 2010) that is producing the following:

There are five data points on there, however the result set I am using has 10 rows (a 'Completed Date' of datetime and a 'Lateness' integer whose values can be positive or negative.

This is the Dataset and the results it produces:

SELECT DISTINCT TOP 10
a.ACTIVITY_NAME As [Activity Name]
, ad.COMPLETED_DATE As [Completed Date]
, ad.DAYS_LATE As [Lateness]
FROM ACTIVITIES a
JOIN ACTIVITY_DATA ad ON ad.ACTIVITY_ID = a.ACTIVITY_ID

[code]....

How can I tell SSRS to show every data point in my chart?

View 7 Replies View Related

Opening Up Odbc Data Source In The Query Query Inside Of The Server Manager

Jun 15, 2007

I'm trying to find the command to open up an odbc conection inside sql2005 express. I only have ues of an odbc connector, we're conection to remedy. We will eventually be using stored procedures to extract the data we need from remedy and doing additional data crunching. I'm a foxpro programmer so once I get the correct syntax for making the odbc connector I shold be ok. Also I need a really good advanced book on sql2005. The type of book that would have my odbc answer. I've spent all morning trying to find this information and was unable to.



Thanks in advance



Daniel Buchanan.



If this was the wrong forum to post this on, please move this question to the correct one. I need this answer soon.

View 1 Replies View Related

SQL Server Not Showing The Drives

Mar 13, 2006

My sql server is not showing all of my drives in server. Please help me

View 5 Replies View Related







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