Hi all!
I´m getting a very unpleasant result when I use "SELECT * FROM <many-columns-table (40+)>". Each query row appears with overwritten columns (not all but some of them)... also outside EM window !!!
There is no data corruption on EM nor Windows, all programs remains running with no other sign but garbage overwritten... garbage dissapears after window refreshing.
Just 1 month ago I made a 2-day full reinstall of my computer, so I don´t know what program could install an offending module/DLL/??? buy I´m sure it was working before. I hate that!
Have you ever noticed something like that?
Do you think is a DLL problem?
Do you know a turn around? (I don´t want to reinstall all again!!!)
Actually I´ve tried reinstalling SP4, SP5 on WS, uninstalling/reinstalling Client with no luck...
Thanks,
Cesar.
hi evryone I have a question! in my ASP.NET page I use a SqlDataAdapter object for working on my database first I declare it as a global vaiable(SqlDataAdapter objDataAdapter;) then I construct it in my Page_Load procedure like this (objDataAdapter=new SqlDataAdapter(strSql,objConnention)) then when I want to use it in my other procedures an error tells me that your object does not exist for solving this error I should construct my objDataAdapter in evry procedure using it. but I think such variables should not be erased from Heap automatically(with Garbage Collection) because it has a reference to Stack. I mean the global variable... any opinion ? Thanks
hi, My database server had hung up recently, and I had to restart it. After checking the log I found some garbage entries in it. has anyone encountered similar errors? harshal.
I was testing my packages today and my packages were running sucessfully when I didnt have any valid data in the flat file. One the reason was as not rows were returned from the flat file none of the validation script components returned any err.
How do I count the # of rows which were read from flat file from the package and continue only if there is more than one row.
I tried using conditional split but as I wont have the row count value availble till the dataflow task runs this didnt help.
Is it best for me to have two dataflow tasks one resturns the count of records from flat file and the other starts if there are any rows. Now my problem is if I have rows to process how to I transfer the flatfile data to validate from DataFlowTask1 to DataFlowTask2?
I have a script task whcih counts the rows and decides to the TaskResult but once the TaskResult is sucess how do I use the values read in DataFlowTask1?
Everybody,I've been doing a lot of on-line research and cannot findany reference to the exact problem I'm having.Let me preface this question with the fact that I'm comingfrom an Oracle background so my approach may not be the bestway to tackle this. However, from the research I have donethis approach seems reasonable. Also, I know about theundocumented procedure sp_MSforeachtable. That can give me aresult similar to what I'm looking for but the format of theoutput is not what I need.Now the problem. I'm trying to write a reusable script to giveme a list of all the tables in a database that have 1 or more rows.My approach is to a BAT file (see script 1 below) that calls OSQLtwice, once to call a SQL script (see script 2 below) that uses theInformation_Schema views to generate the SELECT COUNT(*) statementsand fill in all the tables names in the database, write this to atemporary output file and the second OSQL command to read thetemporary output file and generate me the results formatted theway I need.The result of the first OSQL run is correct EXCEPT for 1> 2> 3> 4> 5>6> 7> 8> 9> 10> 11> 12> 13> garbage at the beginning of the file.Because of this garbage the 2nd OSQL command blows up! Anyone haveany idea what is generating this garbage?If I manually edit out the garbage and then just run the 2nd OSQLcommandI get similar garbage in the final result file (see 2nd result filebelow).In Query Analyzer, when I run the GET_TABLE_COUNT.SQL Script manuallythen take its output and copy and paste it to a new query window andrun that it works OK except for generating lots of blank lines wherethe result of the tables that have zero rows are. I am suppressingheadings but am still getting the blank lines but at least it works!Any ideas anybody? Thanks For Any HelpFYI -- SQL Server 2000 with SP3a.Bob================== Script 1 - BAT File to Call OSQL ===============@echo off@echo ************************************************** *************@echo .@echo get_table_count.bat@echo .@echo Before you run this script change to the drive and directory@echo where the input SQL script is located!@echo .@echo Input parameters:@echo 1) SQL Server userid@echo .@echo You will be prompted twice for your password!@echo .@echo The output is written to file TABLE_COUNT_RESULT.TXT@echo .@echo ************************************************** *************pauseosql -U %1 -S devkc-db -d C3T_Architecture -i get_table_count.sql -otemp_table_count_query.txt -h-1 -w500osql -U %1 -S devkc-db -d C3T_Architecture -itemp_table_count_query.txt -o table_count_result.txt -h-1 -w500del temp_table_count_result.txt@echo on================================================== ==================================== Script 2 - GET_TABLE_COUNT.SQL Script ===============set nocount onselect 'set nocount on'select 'select ''Table Name Count'''select 'select ''========== ====='''select 'select '''+ table_name+ ''', count(*) from '+ table_name+ ' having count(*) > 0 'from information_schema.tableswhere table_type = 'BASE TABLE'order by table_name================================================== ================================ Partial Result of 1st OSQL Run ==========================1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> set nocount onselect 'Table Name Count'select '========== ====='select 'ACT_ASSERTION_RULE', count(*) from ACT_ASSERTION_RULE havingcount(*) > 0select 'ACT_ASSOC', count(*) from ACT_ASSOC having count(*) > 0select 'ACT_DOC', count(*) from ACT_DOC having count(*) > 0================================================== ================================ Partial Result of @nd OSQL Run ==========================1> 2> 3> 4> ... I edited out the intervening numbers for this message.... 664> 665> 666> 667> Table Name Count========== =====.... I edited out lots of blank lines in the result for this messagebefore I get to the first table with 1 or more rows ...ARCH 6================================================== ====================
Folks I have recently had the misfortune of moving to SQL Server Managment Studio as per our upgrade to SQL 2005. There is no doubt that SQL Server Management is a major disappoinment compared to Enterprise manager. The UI is the biggest disaster I have ever seen. Getting rid of the SQL Query analyzer tool was a TERRIBLE idea. The UI is buggy and unfriendly. It is a major POS. I hope someone in the SQL Dev team is listening / reading this post (hellooooo anybody homeee......) Now that I have vented my frustration ... I wanted to know any atlernatives to the SQL Server Management Studio. There are plenty of 3rd Party tools out there I wanted to find out from this forum which popular 3rd Party tools are most developers using Thanks for bearing with me.
I built a SSIS(writing out to a flat file ) in 32 bit machine and it woks fine . But however when I deploy to the produciton server(64 bit) the SSIS writes out garbage data . After some research I found out that the problem with the 32 bit OS and 64 bit OS problem.What is my next step. Am I out of luck that now I will have to redesing the SSIS in 64 bit?
I created the following simple query between two tables:
SELECT vru.User_Name0, vru.Full_User_Name0, vru.department0, vru.employeeNumber0, vru.title0, vru.manager0, vrs.location0, vrs.Netbios_Name0, vrs.Last_Logon_Timestamp0 FROM v_R_User vru LEFT JOIN v_R_System vrs ON vru.ResourceID = vrs.ResourceID ORDER BY vrs.User_Name0
I don't know how to properly insert a pic, but basically I get output, except the last 3 columns. I've tried every variation of JOIN and I cannot seem to solve this issue.
Hye Friends, I'm using a DMX query to get some predictions out of my MiningModel
my DMX query is as follows :
SELECT predict([x SalaryPredictor].[Emp Gross],20),predict([x SalaryPredictor].[Emp Basic],20) From [x SalaryPredictor]
This query is returning me 2 objects of type expressions in my Dataset. The problem is when I try to drag these 2 fields in my Table i get a "#Error" value
I executed the query in 'Data' tab and found that data is getting returned is a tree like format where "Expression" is at top & values expected ar its child nodes.
I also found out that the returned objects are actually AdomdDataReader , but i'm not able to write a expression to get its values in my tables....
I want to display the values in the following format....
Is there a way to create an expression that references the DataSets / Queries? I'd like to be able to create an expandable text box that shows the raw sql query used to generate the report.
I've got a union query (below)and it returns rows that have duplivate itemno's, descrip's, imsrp3's, and imsrp4's, while the remaining columns are not duplicate for the same row. An Excel report uses this query to populate itself and for a more visually appealing look, I'd like to skip the duplicated columns in the display. I'm not sure how to use the Distinct or Group by in this case, since technically I'm dealing with two separate queries, neither one separately returning any duplicate rows. thanks for any suggestions...
~ select itemno,descrip,imsrp3,imsrp4,qoh,border,wadcto,wad oco, watrdj,wapddj,wauorg,wauser from nowo where nowo.wasrst <='40' union select itemno,descrip,imsrp3,imsrp4,qoh,border,wadcto,wad oco, watrdj,wapddj,wauorg,wauser from nopo where nopo.wasrst <='499'
I have a query where I have customers, date they ordered a swatch, date they ordered an item, and eh date diff between the two. I want to show the MIN date diff for each customer, and also show the swatch date and item date as well. But to use the MIN aggregate, it forces me to group everything, where I just want to group by customer, and have the 2 dates tag along, because i only want one record per customer. What is the easiest way for me to accomplish this?
I have a problem... I have a SELECT query I have used in my PHP report. It is as follows:
SELECT DISTINCT callref, CASE WHEN (stage.due_date < stage.completed_date) THEN 'SLA Breach' ELSE ' In SLA' END AS sla FROM tableX.... WHERE call_status=open.....
I wish to search through all stages (i.e response, fix, end) of the calls logged in our database, & then return 'In SLA' for each call that had all its stages completed within the SLA, & 'Breach' for all calls that had even one of its stages completed outside its SLA.
At the moment the SELECT query above gives me the following results:
Call Ref sla
10001 In SLA 10002 Breach 10002 In SLA 10003 In SLA 10004 In SLA 10005 Breach 10005 In SLA ... ...
What it should look like is this....
Call Ref sla
10001 In SLA 10002 Breach 10003 In SLA 10004 In SLA 10005 Breach ... ...
Please let me know if anyone has the answers or any clues to this! thanks.
The row counts I am getting from SQL Enterprise Manager and QueryAnalyzer are different. When I double click a table in EnterpriseManager it gives me a row count of say 1000. However, when I select *from that same table in Query Analyzer it returns 1028 rows. Anyoneknow why or better yet, how to fix it? Thanks!
I've got a SQL2008 database with 2008R2 Express loaded.
In VS2012 if I right click a table and select New Query, I get the Visual Designer.
In VS2013, same database, I get a blank page
I've tried a fresh install of 2012 and 2013 onto a fresh Win8.1, same thing. SQL2012 Express, same. If I use an LocalDB option, again no tools. I've tried Ultimate to see if it's something not in Pro.
Also the "code only" query doesn't connect me to the file properly, so even if I accept doing the query by hand, I have to paste a connection string every time.
I'm expecting it to do as per VS2012, and the VS2013 pages in [URL] My database is an attached file from an ASP.NET project App_Data folder.
I used to do this with classic asp but I'm not sure how to do it with .net.Basically I would take a table of Categories, Then I would loop through those. Within each loop I would call another stored procedure to get each item in that Category. I'll try to explain, Lets say category 2 has a player Reggie Bush and a player Drew Brees, and category 5 has Michael Vick, but the other categories have no items.Just for an example.. Category Table: ID Category1 Saints2 Falcons3 Bucaneers4 Chargers5 FalconsPlayer Table:ID CategoryID Player News Player Last Updated1 1 Reggie Bush Poetry in motion 9/21/20062 1 Drew Brees What shoulder injury? 9/18/20063 5 Michael Vick Break a leg, seriously. 9/20/2006 Basically I would need to display on a page:SaintsReggie BushPoetry in MotionFalconsMichael VickBreak a leg, seriously.So that the Drew Brees update doesnt display, only the Reggie Bush one, which is the latest.I have my stored procedures put together to do this. I just don't know how to loop through and display it on a page. Right now I have two datareaders in the code behind but ideally something like this, I would think the code would go on the page itself, around the html.
If String AB06 is then I need to get AB05; if it is AB11 I need to get AB10.
My select statement looks like this:
select 'AB'+(cast(substring(period,3,2) as int)-1) from table.
Result is AB6. But I want AB06 (ABzero6)
But when I do this, I'm getting AB6 instead of AB06. Can someone please tell me how to have '0' in front of 6? I guess when I cast it as integer, it is ignoring the leading 0.
I've managed to grouped by Category field nicely and added extra calculated column for handling to total plus as well as Total for each group plus added a new row for TOTAL in the TABLE and returned as follow:
Now I want to put another extra row underneath TOTAL for handling the calculated but the business rule is only for displaying from the first group for instance:
Code Snippet
TOTAL: $3032
Calculated Average per fruits: $1010.67 ($3032 / 3 UNITS).
3 UNITS is coming from Units for Apple and Banana.
I don't know if I can do this cause i did try to use
Code Snippet
=SUM(IIF(Fields!Category.value = "FRUITS", Fields!Units.Value, 0)) But it's successfully compiled but the report result error (#Error) on that field only. Any ideas?
I thought a simple like this can be handled quite easily instead of creating a new report view type in the the same dataset to handle this particular extra line.
I am trying to create a user permission system that is stored in a database. What is the best table structure for accomplishing this? How could I display the permissions in a grid? Currently I have a users table and a permissions table. I created a map between the two. However, I don't see how this allows me to display a grid. All my "columns" for permissions are actually rows from the permissions table. So ideally my grid would look something like this. User | P1 | P2 | P3 |A | T | F | T |B | T | T | T |Thanks for any help. I am relatively new to SQL so please explain gently.
Hi, I am a new VWD user and have been trying to set up a website that allows 1 user to upload images into to SQL Express database and then display them with a variety of other fields. I have searched the forums, several books and many ASP "training" websites to find out how to do this. Every website seems to teach how to display a list of employees or show photo gallery, but none explains how to upload an image, save it in the appropriate field(s) in the database, and then display it when requested in a Datagrid or Details View using VWD and SQL Express 2005 Can any one give me directions to a solution, or send me a simple solution to this? The best example of what I need is is a real estate listing, wherethe property for sale has 8 to 10 descriptive fields and 1 to 3 images that are displayed. Any help would be appreciated. Spacecaetrg.
I have built an ADP for an internal project. The rpoblem I'm having is that one computer is not displaying reports. No matter who the user is it will not show the reports. I thought it might be a software issue/conflict, so I changed out the hardrive and started with a clean OS with only MS Office installed on it. I have also made sure that the users have access rights to SQL along with all sprocs used in the reports. But I'm still having the same problem. There are four other computers in the office that use the application and all work fine. If anyone has any ideas or suggestions I would be glad to hear them.
I basically want to display the single row that has the highest 'jobid' using a SP. I was playing with MAX(jobid) but getting errors about no group by, etc. Where do I begin with this?
SELECT Purchord, JobNo, Descr, customer, jobid FROM Jobs
I am hoping someone can help me on this. I have lost the ability to see tables in one database. I can see views and have full access rights on this database. I was trying to install OLAP Analysis on my PC and suddenly I lost this capability on one of the databases I access. Any thoughts? I have looked at everything I can find trying to fix this. Have re-installed and even cleared my user and re-added. It is something on my PC alone since it also affects anyone who signs on to my box.
I have a list box getting a filtered recordset from a stored procedure using ADO calling in VB6. The recordset returns the two records with correct values. The problem is it is not displaying in the list box. Why? I tried using .additem property but it is not available in Access 2000. Can anyone help me with this?
Function .. Dim rs_get_defect_desc As New ADODB.Recordset, lot_n as integer Set lot_n = 4051
Rs_get_defect_desc.Open "EXEC spGet_desc_defect @lot_n=" & lot_n, CurrentProject.Connection Do While Not rs_get_defect_desc.EOF
My problem arises when I want to display First Name and Last Name for both the POCusername and the AssigneeUserName since FirstName and LastName columns exists once in the Personnel table. How can I display the columns twice. Lets say POCFirstName, POCLastName, AssigneeFirstName, and AssigneeLastName. Or this is something that can't be done.
The query below only display the Assignee info. Of course, I need to something else to display the POC info as well...don't where to go from here...
select tblPersonnel.FirstName, tblPersonnel.LastName, tblAsset.AssigneeUserName, tblAsset.POCUserName from tblVendor, tblAsset, tblPersonnel where and tblPersonnel.UserName = tblAsset.AssigneeUserName and tblAsset.POCUserName in(select tblPersonnel.UserName from tblAsset, tblPersonnel where tblPersonnel.UserName= tblAsset.POCUserName)
Hi do u know what the shortcut or the code command to diplay an SP code in QA. Instead of right clicking the SP in QA and clicking "Script object to New window as Create" is there a command or a shortcut that I can type using keyboard Thank you
I need to add up the number of people who joined this month and compare that number to the number of people who joined last month and display the results in a report:
FirstName..LastName.....StartedDate Randy......Simpson......5/4/2007 10:00:00 PM Steve......Rowe.........5/2/2007 10:00:00 PM Eric.......Dickerson....5/4/2007 10:00:00 PM Gloria.....Sanches......5/1/2007 12:00:29 AM Andres.....Marcelino....5/1/2007 12:06:31 AM katie......ryan.........6/4/2007 12:08:35 AM Denise.....River........6/4/2007 12:27:14 AM Kellog.....Stover.......6/5/2007 12:37:20 AM Glenn......Sanders......6/1/2007 12:42:40 AM
I'm not sure how to go about this and need some help.I've got a data extract rather than a properly structure table in SQL.It looks something like below:Name: Item:John BallJohn RacketPaul BallJim GloveJim BallWhat sort of script can I run that will return each name once and thenthe Items in as many columns needed to list them all?I.e. so that it will look likeName: Item1 Item2John Ball RacketPaul BallJim Glove BallRegards,Ciarán