Query In IR studio
<p>I have Olap Result section, table, report sections</p><p>in my dashboard i have 5 combo boxes and a submit button then apivot table</p><p>i need values to be populate on combo box dynamically from datasource</p><p>when i click submit button i need corresponding values to beview in pivot table</p><p>how could i do this</p><p>any template or components will make very useful for us</p>
a couiple of issues/questions here.
Do you really have a report that shows 3.5 million rows of data on it? That is a bit extreme for an Analysis/Report
how many columns wide is the data? how big is the file on the desktop uncompressed with all the data? are you doing sorts or computed columns in the BQY on the data? How many Chart, Pivot, Report sections
What is your EPM install 32bit or 64 bit?
You might want to look at:
- Aggregating data in Query or Database.
- Using a different Tool. (Production Reporting (SQR)
- if using 64bit increase the JVM settings (min/max) for BI service.
Similar Messages
-
Morning all,
I've just been assigned a report-related project but I have not created much of anything in C# or .Net before!
I was wondering if someone could help me get started. Here are the specifications:
Basically, I am to create an automated report application. I have the query and I will include it further down
in this post. The page is to have a couple blanks to specify the Start Date and End Date and replace those dates in the query, and generate the report. What I need some help on is how to make the SQL query work in the application which I will connect to the
intended database to generate the report (basic I know, but I'm new at this) on Visual Studio 2010. I also need some help on programming the Start Date blank and End Date blank so that what the user types in for those blanks will replace the date fields in
the SQL query, then generate the report with the new dates.
I appreciate the help!
The SQL query and what the dates are replacing:
select
PTH.INST_ID ,
PTH.EMPLOYEE_ID,
DBH.HR_DEDUCTION_AND_BENEFITS_CODE,
replace(DB.DESCRIPTION,',',''),
DB.WITHHOLDING_LIABILITY_ACCOUNT_MASK,
DBH.HR_DEDUCTION_AND_BENEFITS_ID,
DBH.CHECK_DATE,
DBH.CHECK_NO,
DBH.FIN_INST_ACCT_ID,
replace(replace (DBH.COMMENT,CHAR(10),' '),CHAR(13),' '),
DBH.HR_DEDUCTION_AND_BENEFIT_CYCLE_CODE,
DBH.LENGTH,
DBH.EMPLOYEE_COMPUTED_AMOUNT,
DBH.EMPLOYEE_BANK_ROUTING_NUMBER,
DBH.EMPLOYEE_ACCOUNT_TYPE,
DBH.EMPLOYEE_ACCOUNT_NUMBER,
DBH.EMPLOYER_COMPUTED_AMOUNT,
DBH.EMPLOYEE_GROSS_AMOUNT,
DBH.EMPLOYER_GROSS_AMOUNT,
DBH.PAYROLL_EXCLUDE,
PTH.VOID_DATE,
PTH.BATCH_QUEUE_ID,
B.BATCH_CODE,
BQ.FY,
BQ.END_DATE,
BQ.COMMENTS,
BQ.BATCH_CRITERIA_USED,
BP.COLUMN_VALUE,
PTH.REPLACEMENT,
P.LAST_NAME,
P.FIRST_NAME,
P.MIDDLE_NAME
from PY_EMPLOYEE_TAX_HISTORY PTH
INNER JOIN PERSON_EMPLOYEE PE ON
PE.INST_ID=PTH.INST_ID AND
PE.EMPLOYEE_ID=PTH.EMPLOYEE_ID
INNER JOIN PERSON P ON
PE.INST_ID=P.INST_ID AND
PE.PERSON_ID=P.PERSON_ID
LEFT JOIN HR_EMPLOYEE_DEDUCTIONS_AND_BENEFITS_HISTORY DBH ON
PTH.INST_ID=DBH.INST_ID AND
PTH.CHECK_DATE=DBH.CHECK_DATE AND
PTH.CHECK_NO=DBH.CHECK_NO AND
PTH.EMPLOYEE_ID=DBH.EMPLOYEE_ID
LEFT JOIN HR_DEDUCTION_AND_BENEFITS DB ON
DB.INST_ID=DBH.INST_ID AND
DB.HR_DEDUCTION_AND_BENEFITS_CODE=DBH.HR_DEDUCTION_AND_BENEFITS_CODE
LEFT JOIN BATCH_QUEUE BQ ON
PTH.BATCH_QUEUE_ID=BQ.BATCH_QUEUE_ID
LEFT JOIN BATCH B ON
B.BATCH_CODE=BQ.BATCH_CODE
LEFT JOIN BATCH_PARAMETER BP ON
BQ.BATCH_QUEUE_ID=BP.BATCH_QUEUE_ID
AND BP.COLUMN_NAME = 'SUPPRESS_DIRECT_DEPOSIT'
------Please change the WHERE condition for date range of the month you need to run this for.
WHERE PTH.CHECK_DATE >='07/01/2013'
AND PTH.CHECK_DATE <='07/31/2013'
and BQ.BATCH_CODE='BAT_PY_PAYCALC'
and bq.fy=2014
ORDER BY PTH.INST_ID ,
PTH.EMPLOYEE_ID,
DBH.HR_DEDUCTION_AND_BENEFITS_CODE,
DBH.CHECK_DATETry this code. The Server name will be the same name when you use SQL Server Management Studio (SSMS). It is in the login window for SSMS. I assume you are using SQLSTANDARD (not SQLEXPRESS) which is in the connection string in the code
below. I also assume you have remote connection allowed in the database.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace ConsoleApplication1
class Program
const string DATABASE = "Enter Database Name Here";
const string SERVER = "Enter Server Name Here";
static void Main(string[] args)
DateTime startDate = DateTime.Parse("07/01/2013");
string startDateStr = startDate.ToString("MM/dd/yyyy");
DateTime endDate = new DateTime(startDate.Year, startDate.Month + 1, 1).AddDays(-1);
string endDateStr = endDate.ToString("MM/dd/yyyy");
string connStr = string.Format("Server={0}\\SQLSTANDARD;Database={1};Trusted_Connection= True;", SERVER,DATABASE);
string SQL = string.Format(
"select\n" +
" PTH.INST_ID\n" +
",PTH.EMPLOYEE_ID\n" +
",DBH.HR_DEDUCTION_AND_BENEFITS_CODE,\n" +
",replace(DB.DESCRIPTION,',','')\n" +
",DB.WITHHOLDING_LIABILITY_ACCOUNT_MASK\n" +
",DBH.HR_DEDUCTION_AND_BENEFITS_ID\n" +
",DBH.CHECK_DATE\n" +
",DBH.CHECK_NO\n" +
",DBH.FIN_INST_ACCT_ID\n" +
",replace(replace (DBH.COMMENT,CHAR(10),' '),CHAR(13),' ')\n" +
",DBH.HR_DEDUCTION_AND_BENEFIT_CYCLE_CODE\n" +
",DBH.LENGTH\n" +
",DBH.EMPLOYEE_COMPUTED_AMOUNT\n" +
",DBH.EMPLOYEE_BANK_ROUTING_NUMBER\n" +
",DBH.EMPLOYEE_ACCOUNT_TYPE\n" +
",DBH.EMPLOYEE_ACCOUNT_NUMBER\n" +
",DBH.EMPLOYER_COMPUTED_AMOUNT\n" +
",DBH.EMPLOYEE_GROSS_AMOUNT\n" +
",DBH.EMPLOYER_GROSS_AMOUNT\n" +
",DBH.PAYROLL_EXCLUDE\n" +
",PTH.VOID_DATE\n" +
",PTH.BATCH_QUEUE_ID\n" +
",B.BATCH_CODE\n" +
",BQ.FY\n" +
",BQ.END_DATE\n" +
",BQ.COMMENTS\n" +
",BQ.BATCH_CRITERIA_USED\n" +
",BP.COLUMN_VALUE\n" +
",PTH.REPLACEMENT\n" +
",P.LAST_NAME\n" +
",P.FIRST_NAME\n" +
",P.MIDDLE_NAME\n" +
" from PY_EMPLOYEE_TAX_HISTORY PTH\n" +
" INNER JOIN PERSON_EMPLOYEE PE ON\n" +
" PE.INST_ID=PTH.INST_ID AND\n" +
" PE.EMPLOYEE_ID=PTH.EMPLOYEE_ID\n" +
" INNER JOIN PERSON P ON\n" +
" PE.INST_ID=P.INST_ID AND\n" +
" PE.PERSON_ID=P.PERSON_ID\n" +
" LEFT JOIN HR_EMPLOYEE_DEDUCTIONS_AND_BENEFITS_HISTORY DBH ON\n" +
" PTH.INST_ID=DBH.INST_ID AND\n" +
" PTH.CHECK_DATE=DBH.CHECK_DATE AND\n" +
" PTH.CHECK_NO=DBH.CHECK_NO AND\n" +
" PTH.EMPLOYEE_ID=DBH.EMPLOYEE_ID\n" +
" LEFT JOIN HR_DEDUCTION_AND_BENEFITS DB ON\n" +
" DB.INST_ID=DBH.INST_ID AND\n" +
" DB.HR_DEDUCTION_AND_BENEFITS_CODE=DBH.HR_DEDUCTION_AND_BENEFITS_CODE\n" +
" LEFT JOIN BATCH_QUEUE BQ ON\n" +
" PTH.BATCH_QUEUE_ID=BQ.BATCH_QUEUE_ID\n" +
" LEFT JOIN BATCH B ON\n" +
" B.BATCH_CODE=BQ.BATCH_CODE\n" +
" LEFT JOIN BATCH_PARAMETER BP ON\n" +
" BQ.BATCH_QUEUE_ID=BP.BATCH_QUEUE_ID\n" +
" AND BP.COLUMN_NAME = 'SUPPRESS_DIRECT_DEPOSIT'\n" +
" WHERE PTH.CHECK_DATE >='{0}'\n" +
" AND PTH.CHECK_DATE <='{1}'\n" +
" and BQ.BATCH_CODE='BAT_PY_PAYCALC'\n" +
" and bq.fy=2014\n" +
" ORDER BY PTH.INST_ID\n" +
",PTH.EMPLOYEE_ID\n" +
",DBH.HR_DEDUCTION_AND_BENEFITS_CODE\n" +
",DBH.CHECK_DATE", startDateStr, endDateStr);
SqlDataAdapter adapter = new SqlDataAdapter(SQL, connStr);
DataTable dt = new DataTable();
adapter.Fill(dt);
jdweng
Could you elaborate more on what this code does in general?
Does it generate a table with the data between specified dates? If so, where is the table shown?
Where does one enter in the specified start and end dates on the Web Application? Do I have to create start and end date blanks and link them to the code for it to work?
Sorry for the inconvenience - I'm just really new at this. Thanks! -
SQLEception using Complex SQL Query with Java Studio Creator2 Build(060120)
I am evaluating Java Studio Creator2 for a WEB base application project that will be making SQL queries to an Oracle Database but I have stumble into a problem using complex SQL queries.
I am getting an SQLException "org.apache.jasper.JasperException: java.lang.RuntimeException: java.sql.SQLException: [sunm][Oracle JDBC Driver][Oracle]ORA-00923: FROM keyword not found where expected". I looks like it cut my sql.
The SQL that I am trying to execute is
Select part_name
from table1, table2
where table1.part_nbr = table2.part_nbr
and table2.row_add_dt = (select max(table3.row_add_dt)
from table3
where table3.ser_part_id =table2.ser_part_id)
This is a valid query that it is using 2 different selects to get a part number.
If posible, point me to the best solution were I will be able to make complex SQL queries like the one above and bigger.
Is there any way that I can read an SQL query file instead of inserting the SQL query string into the setCommand()?I have read that document looking for some anwsers on how to make this kind of query. If I try the query that I have above in the query editor ,the query editor will cut off from the last select that is between ().
I beleave, there is a work around using the inner joint or outter join command. I will try them to see If I get the corrent result. If not, then I have to keep on asking for possible solutions.
Anyway, someone in the Creator Team should take a note in adding something like a special criteria in the Add Query Criteria Box for cases like the one I have. The special criteria will be like using another select/from/where to get some result that will be compare.
Girish, Are you in the Sun Creator Team? -
How to set a BEx Query Condition in Design Studio (e.g. Net value GT 0)
Hi experts,
I have set a simple condition in my BEx Query...
e.g. key figure "Net value" GT 0 to become only positive values in the query result.
In the Query runtime the condition works successful, but in the Design Sudio view the defined Query condition doesn´t work.
In my Design Studio crosstab I have tried to switch between the display setting "Conditional formating Visible" true/false, but without success.
By the way, before I have posted this thread, I had a look at this two blogs...
Design Studio 1.0: Create a Scorecard Using SAP BW BEx Query Exceptions
Design Studio 1.2 - a Second Look
Any ideas or experiences?
Thanks and regards,
MichaelHi Michael,
I think you are mixing up two different BEx terms. Conditions are filters on key figures (show me only the results with a value bigger than 50). Exceptions do not filter the result set, but provide a formatting based on the values in the result set (if value is bigger than 50, make its cell red).
The Conditional formatting setting in Design Studio refers to the BEx exceptions. For the BEx conditions there isn't such a setting available. You just have to activate the condition in your BEx Query and use that for your data source in Design Studio.
If you want a workaround to enable/disable conditions from Design Studio, check this blog I wrote: HackingSAP.com - SAP Design Studio and Conditions It shows how you can use variables to adjust the conditions (and also activate) from within Design Studio.
Cheers,
Xavier -
How to handle 3 different fact tables and measures within a DAX query?
I am writing a DAX query in DAX studio in Excel against a tabular model that has 4 different Fact tables, but they share the same dimensions. (There's some long story I can't get into here, but unfortunately this is the structure) I want to
include measures from the 4 fact tables, summarize by the dimensions in a single query output that can be used for a pivot table. So far I have something like this:
EVALUATE
FILTER
SUMMARIZE
FactTable1,
DimensionTable1[Value], DimensionTable2[Value],
DimensionTable3[Value],
Dimensiontable4[Value],
'dimDateTime'[Month PST],
DimDateTIme[FiscalYear PST],
"Measure Score",
FactTable1[Measure 1],
"Measure Score 2",
FactTable1[Measure 2],
,Company[CompanyName]="Company ABC"
What I want to do is summarize the 3 fact tables by the same dimensions, but I am not sure how to do that within a DAX query. I am getting an error if I try to include another table statement in the original SUMMARIZE function, even though the FACTS
do share the same dimension. Is there an easy way to do this?You can use ADDCOLUMNS to add the data from other tables, but you need to use within the SUMMARIZE the fact table that determines the cardinality of the output. If you are not sure (e.g. you project cost and revenues from two fact tables by month and there
could me months with cost and no revenues, but also months with revenues and no costs), then you should use CROSSJOIN and then FILTER.
You query might be written as (please note CALCULATETABLE instead of FILTER to improve performance):
EVALUATE
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE (
FactTable1,
DimensionTable1[Value],
DimensionTable2[Value],
DimensionTable3[Value],
Dimensiontable4[Value],
'dimDateTime'[Month PST],
DimDateTIme[FiscalYear PST]
"Measure Score", FactTable1[Measure 1],
"Measure Score 2", FactTable1[Measure 2]
Company[CompanyName] = "Company ABC"
Marco Russo http://www.sqlbi.com http://www.powerpivotworkshop.com http://sqlblog.com/blogs/marco_russo -
Batch Query takes too much time
Hi All,
A query as simple as
select * from ibt1 where batchnum = 'AAA'
takes around 180 seconds to give results. if I replace batchnum condition with itemcode or anything other than batchnum, the same query returns results in some 5 seconds. the IBT1 table has nearly 3 lac rows. Consequently, a little complex query involving batchnm conditions gives 'query execution time out' error.
what could be the reason? any resolution?
Thanks,
BinitaHello Binita,
You need some database tunning....
The IBT1 table has complex index on ItemCode, BatchNum, LineNum, WhsCode, and has no index on bacthnumber. But it has statistics, and statistics are useful for running queries ( see [ms technet here|http://technet.microsoft.com/hu-hu/library/cc966419(en-us).aspx]). Also there is a note about performance tunning databases 783183 .
There is 2 ways to "speed up" your query: indexes and statistics
Statistics
See the statistics of IBT1 table:
exec SP_HELPSTATS 'IBT1','ALL'
the result set you see : the statistics name ([IBT1_PRIMARY] and some statistics created by the system name likes WASys_XXXX. For Batchnum, you can execute the following statement:
DBCC SHOW_STATISTICS ('IBT1',_WA_Sys_00000002_4EE969DE)
--where _WA_Sys_00000002_4EE969DE is the name of the statistics of batchnum
Check the resultset. If the "updated", "rows","row sampled" columns. If necessary, you can update the statistics by:
-- update statistics on whole database
EXEC SP_UPDATESTATS
-- update all statistics of IBT1 table
UPDATE STATISTICS IBT1 WITH FULLSCAN
-- update a specific statistics of IBT1 table
UPDATE STATISTICS IBT1(_WA_Sys_00000002_4EE969DE) WITH FULLSCAN
Index defragmentation/reindex
If the index not contiguous, the seeking inside several fragmented files takes more time.
Execute your query in Management Studio Query analizer, and trun on Excution plans (CTRLL or CTRLM). This shows the compute cost of the query.
select * from ibt1 where batchnum = 'AAA'
result will be [IBT1_PRIMARY] index scan. You can check the fragmentation of the primary index of IBT1 table:
DBCC SHOWCONTIG ('IBT1') WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS
In the resultset the column ScanDensity shows the fragmentation percent, This value is 100 if everything is contiguous; if this value is less than 100, some fragmentation exists.
Reindex can be done by the following statement:
DBCC DBREINDEX ('IBT1','IBT1_PRIMARY',100) WITH NO_INFOMSGS
Take care: all statements should NOT be execute during business hours.
This may helps you.
Regards,
J. -
Query not running in report builder 3.0
hi, i can run my query in mgmt studio (version 2008R2) and within the query designer of report builder 3.0 but it will not run from report builder. i get a generic error message of "an error has occurred during report processing. (rsProcessingAborted)".
the query uses report parameters and is written with dynamic sql (using a pass-through to oracle). any ideas why the query doesn't execute in report builder ? thanks a bunch,Hi KanataPablo,
According to your description, it seems that you are using linked server to pass value to oracle. Seeing that the query is worked well in Management Studio, you may have the permission to connect to oracle (In this scenario, make sure the users to run the
query in SSMS and Report Builder are the same user). So this issue can be caused by the user’s permission to connect to report server, the credential of data source and the dynamic query.
We can add the current user as a Login, then click Properties and navigate to User Mappings page, enable ReportServer and ReportServerTempDB options.
We can try to type user name and password, and enable “Use as Windows credentials” as the credential used to connect to data source.
Try with dynamic query:
="Select column1, column2 From tableName where ID IN (" + JOIN(Parameters!param1.value, ",") + ")"
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Different row counts between SQL management studio and Visual Studio
Hi
I'm pulling data from a NAV database using a stored procedure containing a Pivot (due to bad table design), the problem is my SQL management studio is returning 53 rows of records yet Visual studio is only returning 5.
I initially copied the query from management studio into VS to create my dataset, however after returning very few records I used a stored procedure instead.
Unfortunately the same result occurred, 5 records instead of 53,
Is there something different between the two systems, perhaps VS doesn't like something in the Pivot?
Can anyone help?
Thanks
Charlie
CREATE
PROCEDURE [dbo].[PosReleaseTestPrepared]
--@Date AS DATETIME
AS
BEGIN
-- -- SET NOCOUNT ON added to prevent extra result sets from
-- -- interfering with SELECT statements.
-- SET NOCOUNT ON;
-- -- Insert statements for procedure here
DECLARE @cols
NVARCHAR(MAX),
@stmt NVARCHAR(MAX)
SELECT @cols
=
ISNULL(@cols
+
+
+ ES.Code
+
FROM
(SELECT
Code
FROM dbo.[Branston
Live$Enquiry Step]
WHERE [Enquiry Code]
=
'PREPARED')
AS ES
SELECT @stmt
=
SELECT *
FROM
(SELECT PR.[Entry No_], PR.[Mobile User Code], PR.[Failure Step Code],PR.[Item No_], PR.[Customer No_] ,[Enquiry Step Code], Value
FROM dbo.[Branston Live$Positive Release] PR
LEFT OUTER JOIN dbo.[Branston Live$Positive Release Step] PRS
ON PR.[Entry No_] = PRS.[Positive Release Entry No_]
WHERE PR.[Enquiry Code] = ''PREPARED'') PR
PIVOT
MAX(VALUE)
FOR [Enquiry Step Code] in ('
+ @cols
+
) AS P'
EXEC
sp_executesql@stmt
END
GOHi Satheesh, Latheesh
I'm using a shared data source in VS, the server and database are definitely pointed to the right location. As is the Stored procedure/SQL query. The table names "PositiveRelease" are bespoke to us and therefore are easy to recognise.
Below is one of the 5 records from the VS report:
Mobile User Code
Customer No
Item No
Failure Step Code
Depot Date
PP_GY
102980
S10586
DEPOT_DATE
17/02/14
Below is the record from the SQL management studio, you can see it is pulling through matching records.
Mobile User Code
Customer No_
Item No_
Failure Step Code
DEPOT_DATE
PP_GY
102980
S10586
DEPOT_DATE
17/02/2014 -
Query with "not in" no longer working
I created a query to show customers that had not been contacted (i.e.- did not have an activity) in B-one in the last 30 days so the salespeople could do follow up. they started using activities in January and now here in May-something is amiss.
Now after working for a while, it doesn't seem to be working. It doesn't work for 30 days but does for 10 or 11 days specification. There are a lot more activities now and i wonder if this is playing a part in it. no chagnes or updates were made.
i ran the query in management studio and got the same failing results. here is the query:
SELECT T0.[CardCode], T0.[CardName], T0.[Phone1], T0.[CntctPrsn], T0.[E_Mail], T0.[SlpCode], T0.[CardType] FROM OCRD T0 WHERE (T0.[Cardtype]<> 'S' ) and
(t0.[cardcode] not in (Select t3.[cardcode] from OCLG t3 where t3.[recontact] >= getdate() -30))
An example is i have customer A has activities dated 2/2/11, 2/18/11, 3/20/11, 4/5/11, and 4/6/11. doesn't matter if closed or open activity.
30 days from today would be 4/10/11 so customer A should show up in query list ....now NO customers at all show up. If I change the 30 in the GetDate line to 10 or 11, it does give me records. But at 12, it doesn't.
Any thoughts- appreciatively,.
lauraHi,
Try to break query first
run below query first
(Select t3.cardcode from OCLG t3 where t3.recontact >= getdate() -30)
Thanks
Kevin -
If I have a text query in visual studio EXEC DCC_SPP_GetPeopleByDepartment @Department
how can i declare the @Department to be varchar (8000) ?
I tried declaring it in the stored procedure, but when I deploy the report, the query fails as it's looking at the text query.Try :
EXEC DCC_SPP_GetPeopleByDepartment Convert(varchar(8000),
@Department) -
Does SAP Design Studio 1.2 supports BEx conditions....?
Hi All,
Have one scenario where BEx query is having condition (Ex: Keyfigure not equal to '0'). But in design studio, values are not applied with condition.
FYI - One of the documents from SAP, it supports...plz check attachment
Kindly give your comments...Here is the scenario
Am having a BEx query with a condition (Margin not equal to '0') and output of BEx is showing correctly (value - 9575). When i use the same query in Design Studio, output is 106219 which is aggregated value. Verified in BEx output.
As you recommended, i enabled to 'True' the conditional formatting, still expected value is not coming.
Kindly give your inputs -
Query using Table named "Order" is failing
I'm writing a query to look at orders in a table called Order (I did not name it that). Unfortunately, this is also a reserved key term in SQL. In the query in visual studio I put the table name in brackets [Order]. The query is simple
SELECT DISTINCT O.ProjectNo, O.ReportType
FROM [Order] AS O
The query runs correctly while in VS, but once I upload the report to SSRS server, I get an error
Query execution failed for dataset 'EDROrders'. (rsErrorExecutingCommand)
Invalid object name 'Order'
Any ideas? I'm on SQL 2008 R2
Milissa HartwellAre you sure Order is in the same database which datasource is trying to connect? Also are you using an expression based connectionstring?
Another scenario where this can occur is Order table not being in dbo schema. It may be that it will in your default schema (say xxx) so that when you just refer it as Order it will work fine whereas when it runs from ReportServer its using another account
whose default schema is not same as yours. As such it wont find table as its neither in its default schema not dbo
To check that give it access to your schema (if different from dbo) and make select as below
SELECT DISTINCT O.ProjectNo, O.ReportType
FROM [schemaname].[Order] AS O
and try
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Query for printing report if field 1 = x
Forgive me if this is the wrong place to put this, My first time on here.
I want to run a query in management studio 2008r2.
The query goes like this:
SELECT [Default Branch ID], [Contact Title], [Contact FirstName], [Contact LastName], [Phone Home], [Phone Work], [Phone Mobile], [Marketing 1]
FROM Customer
EXCEPT I want to display only entries that match [marketing 1] (Customer birth month) with current date. EG print all customers with details who have a birthday this month.
How would I go about this?
Thanks in advance!
RyanHi
There's no native way to automatically run a query and print from Management Studio.
However are some native ways to push an email if that's any help:
You could write a
SQL Server Agent job to be scheduled once per month to send an
email with information (not available on express and you need to setup dbmail)
You could set up a
Data Drive Subscription in Reporting Services to do much the same (Enterprise or BI Editions only).
Alternatively you could look at non-native solutions such as
this. You're into the realms of windows scripts then. -
Report does not return all data in SSRS
Hello All
I have been developing a report in SSRS, and i have a few filters applied to it. The only thing that i have in the Query that brings everything to my main dataset is the Date filter. @startDate, @endDate.
When i run the query in Management Studio, i get 420 rows for october(1st - 31st), but when i do the same in the report preview(With the same query), i get only 27 rows.
All my parameters have a dataset, and i'm using "IN" instead of "=", they also are configured to have multiple values.
When i test it, i make sure i select all the values available.
What do you guys think might be the issue here???
Thanks in advance!Can you post how your filter statement looks like for handling multiple date values in query?
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Problem with v and w in a cube
Hi,
I have problem with 'v' and 'w' in an Analysis Services cube (SQL Server 2008R2).
The example is employee number 'frvi' and 'frwi'. The cube summarize both employee's measures to employee number 'frvi'. And does not show the employee number 'frwi'. When I make a sql query in the source db it works fine.
The collation for Analysis Services is Finnish_Swedish, and for the source db Finnish_Swedish_Cl_AS. Is it a problem with the collation?
I hope I'll get help here!
//Anna-KarinHi,
Thank you for your answer.
I read now somewhere that w became a letter of it's own in the Swedish language in year 2006. That I did not know. The question is how it is handled in the different collations. I have googled a lot today about this, but have not found anything.
Do you know if you can change the collation in a cube afterwards, and how you do it?
It is correct - when I run a query i management studio, it gives me values for both frwi and frvi. But in the cube the values are summarized to employee frvi.
Best regards Anna-Karin
Maybe you are looking for
-
NEED HELP! can't create mysql connection in DW MX 2004
I re-format my computer last week and after reformatting i install my PHP Triad and Dreamweaver MX 2004, but i can't create mysql connection using DW wizard, i already follow the step: 1. create / manage site 2. choose document type 3. set up testing
-
How do I delete a downloaded iTunes TV episode from my iPhone5?
I downloaded an episode of a TV show thru the iTunes app on my iPhone. This wasnt done thru a sync of the Phone with iTunes. Therefore I cant 'manage' the phone content on the iTunes desktop. I want to delete the episode on the phone (in the iTunes a
-
How do I fade audio in Final Cut Pro X Version 10.6.8
Hi how do I Fade audio in and out in Final Cut Pro X Version 10.6.8 ? In previous final cut I could pin point the audio line using the pen tool cannot seem to find it in Final Cut Pro X Please help?
-
Runtime Error while updati9ng a standard sap table - fagl_saplinfo_val.
Hi, I am facing a problem in updating a standard sap table through a z program. The table name is fagl_saplinfo_val. Error description is: Termination occurred in the ABAP program "ZMIGR_PCA_COPY" - in "SUB_POST-CUSTOMER_DATA".
-
Hi I tested Firefox (28 and 29 beta) on my Galaxy S4 but when I zoom the page and scroll to anywhere,it is not smooth,it is too laggy so I can't use firefox on my mobile phone.Can I resolve this ?