Newbie Needing Help With Sql Script

Apr 10, 2007

I keep getting this error on this script can some one help me out.

There is an error in the query. The data types varchar and sql_variant are incompatible in the add operator.
The multi-part identifier "LANGUAGES.DESCRIPTION" could not be bound.
The multi-part identifier "LANGUAGES.DESCRIPTION" could not be bound.

 


SELECT 'Quarter All' as 'qtr',
       COUNT(JOB.JOBID) as 'transcount',
       COUNT(DISTINCT JOB.PATIENTID) as 'patient count',
       SUM(JOB.LANGUAGE_TCOST) as 'lcost',
       SUM(JOB.LANGUAGE_DISC_COST) as 'dlcost',
       AVG(JOB.LANGUAGE_DISC) as 'avgLDisc',
       SUM(JOB.LANGUAGE_TCOST) + SUM(JOB.LANGUAGE_DISC_COST) as 'LGrossAmtBilled',
       SUM(JOB.LANGUAGE_TCOST) / COUNT(DISTINCT JOB.PATIENTID) as 'PatAvgL',
       SUM(JOB.LANGUAGE_TCOST) / COUNT(JOB.JOBID) as 'RefAvgL',
       SUM(JOB.LANGUAGE_DISC) as 'avgPercentDiscL',
       JOB.JURISDICTION,
       PAYER.PAY_COMPANY,
       PAYER.PAY_CITY,
       PAYER.PAY_STATE,
       PAYER.PAY_SALES_STAFF_ID,
       JOB.INVOICE_DATE,
       JOB.JOBOUTCOMEID,
       JOB.SERVICEOUTCOME,
       INVOICE_AR.INVOICE_NO,
       INVOICE_AR.INVOICE_DATE AS EXPR1,
       INVOICE_AR.AMOUNT_DUE,
       INVOICE_AR.CLAIMNUMBER,
       LANGUAGES.DESCRIPTION
      

FROM JOB
       INNER JOIN INVOICE_AR
                ON JOB.JOBID = INVOICE_AR.JOBID
       LEFT OUTER JOIN PAYER
                ON PAYER.PAYERID = JOB.PAYERID
       LEFT OUTER JOIN STATES
                ON JOB.JURISDICTION = STATES.INITIALS

WHERE
      (INVOICE_AR.AMOUNT_DUE > 0)
AND
      (INVOICE_AR.INVOICE_DATE BETWEEN @startdate and @enddate)
AND  
      (MONTH(INVOICE_AR.INVOICE_DATE) IN (1,2,3,4,5,6,7,8,9,10,11,12))
AND  
      (PAYER.PAY_COMPANY like '%' + @Company + '%')
       
       
Group By
        JOB.JURISDICTION,
        PAYER.PAY_COMPANY,
        PAYER.PAY_CITY,
        PAYER.PAY_STATE,
        PAYER.PAY_SALES_STAFF_ID,
        JOB.INVOICE_DATE,
        JOB.JOBOUTCOMEID,
        JOB.SERVICEOUTCOME,
        INVOICE_AR.INVOICE_NO,
        INVOICE_AR.INVOICE_DATE,
        INVOICE_AR.AMOUNT_DUE,
        INVOICE_AR.CLAIMNUMBER,
        LANGUAGES.DESCRIPTION
Order By 'QTR' asc

View 4 Replies


ADVERTISEMENT

Newbie Needing Help With Joining 2 Fields

Feb 12, 2007

I have a sql 2005 dev ed running an application developed in vs.net 2005 C# I have several gridviews which have a field call first name and a field called lastname I need to put both the firstname and lastname in the same cell or colum row. I do not now how to join these. Can some one help me with a SQL query string that will do this for me.

View 2 Replies View Related

Needing Help

Oct 15, 2007

Hello I'm just learning SQL, here's my problem. I have two tables. I'm trying to extract information from table 1. The information I'm trying to get is data that doesn't have a link on table 2. So for example trains is table 1 and train cars is table 2, All the trains have a car except one. How do I get that train without bringing up all the rest.

View 3 Replies View Related

Neebie Needing Help Asap Restoring Sql

Jun 25, 2007

I am having  problem which is getting worst by the moment. I had a power failure which my battery backup fail while running a large report in my SSRS all of a sudden I started getting reportservertempdb.dbo.persistedstream error. I could not get my reports to run through the iis webservice. I could get them to run from within my reportbuilder. I was told to reload my sql and restore it but I can not get my sql to successfully reinstall I am using the sql2005 dev ed. It either gives me a name instance issue or fails the database, report server and notifaction portion of the reload. I am not sure why it will not reload. any assistance would be great.

View 1 Replies View Related

Query Needing Sum Function/group By?

Apr 24, 2008

select bicycle_shop.bicycle_shop_id, bicycle_shop.company_name, order_.unit_price
from order_ inner join bicycle_shop on order_.order_serial_number = bicycle_shop.order_serial_number
order by order_.unit_price DESC;

this query will bring up a few records for each shop, of the one or more bikes they bought and each bike's price, how do i have these come out to a sum(of the price), so that each bike shop will have a sum of revenue. someone told me i need to use group by and the sum function but i dont know how

View 5 Replies View Related

Needing To Add An Extra Page After A Group

Oct 26, 2007



I want to add an extra blank page after my group, anyone know how to do this? More specifically, I have a report that is grouped by State, when printing I want a blank page to appear before the start of a new State, this will help when the user prints duplex, etc.

View 9 Replies View Related

Needing To Run Reporting Services On SQL Server 2000

Nov 16, 2006

Hi
I want to install SQL Server 2000 Enterprise Edition on Windows XP but it isn't installing.
I have installed SQL Server 2000 Personal Edition but Reporting Services are not installing on the server.
PLZ some one help me out.

View 3 Replies View Related

Needing To Restore Msdb To Another Server To Save Dts And Jobs

Dec 3, 2007



I have a sql2000 server that has failed
i moved the databases to another server


I am trying to restore msdb to another server is this possible in order to get the dts packets and the jobs

View 5 Replies View Related

Long Running Transactions W/ Other Users Needing To Read Data

Jul 23, 2005

I have a very long transaction that runs on the same database thatother users need to use for existing data. I don't care if they seedata from the transaction before it is done and am only using thetransaction because I need a way to roll it back if any errors happenduring the transaction. Unfortunately all tables affected in the longrunning transaction are completely locked and nobody else can accessany of the affected tables while it is running. I am using thetransaction isolation level of read uncommitted, which from my limitedunderstanding of isolation levels is the least strict. What can I do toprevent this from happening?Below is the output from sp_who2 and sp_lock while the process isrunning and another process is being blocked by it.SPID Status LoginHostName BlkBy DBName Command CPUTimeDiskIO LastBatch ProgramName SPID----- ------------------------------------------------------------------------------ ---------- ----------------- ---------------- ------- ------ ------------------------------------------ -----1 BACKGROUND sa. . NULL LAZY WRITER 0 006/09 15:42:52 12 sleeping sa. . NULL LOG WRITER 10 006/09 15:42:52 23 BACKGROUND sa. . master SIGNAL HANDLER 0 006/09 15:42:52 34 BACKGROUND sa. . NULL LOCK MONITOR 0 006/09 15:42:52 45 BACKGROUND sa. . master TASK MANAGER 0 506/09 15:42:52 56 BACKGROUND sa. . master TASK MANAGER 0 006/09 15:42:52 67 sleeping sa. . NULL CHECKPOINT SLEEP 0 1206/09 15:42:52 78 BACKGROUND sa. . master TASK MANAGER 0 206/09 15:42:52 89 BACKGROUND sa. . master TASK MANAGER 0 006/09 15:42:52 910 BACKGROUND sa. . master TASK MANAGER 0 006/09 15:42:52 1011 BACKGROUND sa. . master TASK MANAGER 0 106/09 15:42:52 1112 BACKGROUND sa. . master TASK MANAGER 0 006/09 15:42:52 1251 sleeping SUPERPABLOAdministratorSUPERPABLO . PM AWAITING COMMAND 1813307 06/09 16:10:34 .Net SqlClient Data Provider 5152 sleeping SUPERPABLOAdministratorSUPERPABLO 54 PM SELECT 30 506/09 16:10:16 .Net SqlClient Data Provider 5253 RUNNABLE SUPERPABLOAdministratorSUPERPABLO . master SELECT 0 306/09 16:09:44 SQL Profiler 5354 RUNNABLE SUPERPABLOAdministratorSUPERPABLO . PM UPDATE 10095206 06/09 16:10:02 .Net SqlClient Data Provider 5456 RUNNABLE SUPERPABLOAdministratorSUPERPABLO . PM SELECT INTO 151 2706/09 16:10:33 SQL Query Analyzer 56(17 row(s) affected)spid dbid ObjId IndId Type Resource Mode Status------ ------ ----------- ------ ---- ---------------- -------- ------51 5 0 0 DB S GRANT52 5 0 0 DB S GRANT52 5 1117963059 4 PAG 1:7401 IS GRANT52 5 1117963059 4 KEY (5301214e6d62) S WAIT52 5 1117963059 0 TAB IS GRANT54 5 1117963059 0 TAB IX GRANT54 5 1852025829 0 TAB IX GRANT54 5 1181963287 3 PAG 1:9017 IX GRANT54 5 1117963059 4 KEY (5301934930a4) X GRANT54 5 1117963059 3 KEY (530187fc93f3) X GRANT54 5 1117963059 4 KEY (530154df71eb) X GRANT54 5 0 0 DB [BULK-OP-LOG] NULL GRANT54 5 0 0 FIL 2:0:d U GRANT54 5 1117963059 2 KEY (1d0096c50a7d) X GRANT54 5 1117963059 2 KEY (1b004a9a6158) X GRANT54 5 1117963059 2 KEY (1800a435d44a) X GRANT54 5 1181963287 6 PAG 1:8745 IX GRANT54 5 1181963287 4 PAG 1:8923 IX GRANT54 5 1181963287 2 PAG 1:8937 IX GRANT54 5 1117963059 4 KEY (5301112b0696) X GRANT54 5 0 0 PAG 1:10889 IX GRANT54 5 1181963287 5 PAG 1:8859 IX GRANT54 5 1181963287 6 PAG 1:10888 IX GRANT54 5 0 0 PAG 1:10891 IX GRANT54 5 0 0 PAG 1:10893 IX GRANT54 5 0 0 PAG 1:10892 IX GRANT54 5 0 0 PAG 1:10894 IX GRANT54 5 0 0 PAG 1:10882 IX GRANT54 5 1117963059 3 KEY (530135fbce35) X GRANT54 5 1117963059 0 RID 1:7387:57 X GRANT54 5 1117963059 0 RID 1:7387:59 X GRANT54 5 1117963059 0 RID 1:7387:61 X GRANT54 5 1117963059 3 KEY (5301406ad2bc) X GRANT54 5 1117963059 4 PAG 1:7401 IX GRANT54 5 0 0 PAG 1:7387 IX GRANT54 5 1117963059 2 PAG 1:7389 IX GRANT54 5 1117963059 3 PAG 1:7391 IX GRANT54 5 1117963059 0 RID 1:7387:10 X GRANT54 5 1117963059 0 RID 1:7387:56 X GRANT54 5 1117963059 0 RID 1:7387:58 X GRANT54 5 1117963059 0 RID 1:7387:60 X GRANT54 5 1117963059 3 KEY (530144afbed8) X GRANT54 5 1117963059 4 KEY (530115ee6af2) X GRANT54 5 1117963059 3 KEY (5301c6cd88ea) X GRANT54 5 1149963173 0 TAB IX GRANT54 5 1181963287 0 TAB X GRANT54 5 1117963059 4 KEY (5301d2782bbd) X GRANT54 5 1117963059 3 KEY (5301015bc9a5) X GRANT54 5 0 0 DB S GRANT54 5 0 0 DB [BULK-OP-DB] NULL GRANT54 5 1117963059 4 KEY (5301501a1d8f) X GRANT54 5 1117963059 2 KEY (1c00f3a2b6c5) X GRANT54 5 1117963059 2 KEY (1a002ffddde0) X GRANT54 5 0 0 PAG 1:7411 IX GRANT54 5 1117963059 2 KEY (1900c15268f2) X GRANT54 5 0 0 PAG 1:10840 IX GRANT54 5 1181963287 4 PAG 1:10841 IX GRANT54 5 0 0 PAG 1:10842 IX GRANT54 5 1117963059 3 KEY (5301059ea5c1) X GRANT54 5 0 0 PAG 1:10820 IX GRANT54 5 1181963287 4 PAG 1:10821 IX GRANT54 5 1181963287 5 PAG 1:10874 IX GRANT54 5 1181963287 5 PAG 1:10876 IX GRANT54 5 0 0 PAG 1:10877 IX GRANT54 5 1181963287 5 PAG 1:10878 IX GRANT54 5 0 0 PAG 1:10849 IX GRANT54 5 0 0 PAG 1:10850 IX GRANT54 5 1117963059 2 KEY (1700f225b712) X GRANT54 5 1117963059 4 KEY (5301214e6d62) X GRANT56 5 0 0 DB S GRANT56 1 85575343 0 TAB IS GRANT

View 29 Replies View Related

Newbie Here With A Newbie Error - Getting Database ... Already Exists.

Feb 24, 2007

Hi there
I sorry if I have placed this query in the wrong place.
I'm getting to grips with ASP.net 2, slowly but surely! 
When i try to access my site which uses a Sql Server 2005 express DB i am receiving the following error:

Server Error in '/jarebu/site1' Application.


Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.Source Error:



An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:



[SqlException (0x80131904): Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.
Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735075
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
 
 This is the connection string that I am using:
 <connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;Initial Catalog=ASPNETDB;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
 
The database is definitly in the folder that the error message relates to.
What I'm finding confusing is that the connection string seems to be finding "aranga"s database.
Is it something daft?
 
Many thanks.
James 

View 1 Replies View Related

Inserting Distinct Data From One Table In Another Table, How?!?Really Urgent And Needing Help!!!

May 24, 2007

 Hi, I have a table in which I will insert several redundant data. Don't ask why, is Integration services, it only reads data and inserts it in a SQL table. THis way, I have a SQL table with several lines repeating them selves. What I want to do is create a procedure that reads the distinct data and inserts it in another table, but my problem is that I am not able to select data line by line on the original table to save it in local variables and insert it on the another table, I just can select the last line. I've tried a while cycle but no succeed. Here is my code: create proc insertLocalizationASdeclare @idAp int, @macAp varchar(20), @floorAp varchar(2), @building varchar(30), @department varchar(30)select @idAp = idAp from OLTPLocalization where idAp not in (select idAp from dimLocalization)select @macAp=macAp,@floorAp=floorAp,@building=building,@department=department from OLTPLocalizationif (@idAp <> null)beginInsert into dimLocalization VALUES(@idAp,@macAp,@floorAp,@building,@department)endGO This only inserts the last line in the "oltpLocalization" table. O the other hand, like this:create proc aaaaasdeclare @idAp as int, @macAp as varchar(50), @floorAp as int, @building as varchar(50), @department as varchar(50)while exists (select distinct(idAp) from OLTPLocalization)begin    select @idAp =idAp from OLTPLocalization  where idAp not in (select idAp from dimLocalization)    select @macAp = macAp from OLTPLocalization where idAp = @idAp    select @building = building from OLTPLocalization where idAp = @idAp    select @department = department from OLTPLocalization where idAP = @idApif (@idAp <> null)begin    insert into dimLocalization values(@idAp,@macAp,@floorAp,@building,@department)endendgo this retrieves every distinct idAp in each increment on the while statement. The interess of the while is really selecting each different line in the OLTPLocalization table. I did not find any foreach or for each statement, is there any way to select distinct line by line in a sql table and save each column result in variables, to then insert them in another table? I've also thought about web service, that reads the distinct data from the oltpLocalization into a dataset, and then inserts this data into the dimLocalization table. Is there anything I can do?Any guess?Really needing a hand here!Thanks a lot!

View 1 Replies View Related

SQL Newbie

Feb 6, 2006

Hopefully this is the right place to post this,  I am trying to learn ADO.Net programming using VWD Express with SQL Express... I tried to do the walk-through tutorial on ADO.Net through the asp.net tutorial.  The walk-through asked you to download and install a script (check) then it said to open a command window with sql server running (check) and then to copy all of this special script code into to bind the database to the web page (not check).  Everything pretty much went down hill after that part.  I couldn't get the Update/Cancel/Delete buttons.  After that dissapointing attempt at learning I decided to just try and make my own database.  All was going pretty well until I try to add the UPDATE/DELETE fields after adding the WHERE clause.  No go. 
So, I don't know if I'm just totally flubbing this up or if this is a common problem.  Do I need the two or three pages of custom script like the Microsoft example to make a database work? 
 
Please help!!!
Syntax Override

View 5 Replies View Related

Newbie Q&#39;s Please Help

May 8, 2001

1 Hi, I'm a complete newbie at this, and need some help I want to import a text file into a DB. I know how to set it up in the DTS, however when I check the DB each line from the text file is in a seperate row. What have I missed? I want the file just in one row, like its a memo.

2 What do I use to connect to a SQL DB on the web so i can see the DB and all the tables


3 Also if I want to add data to a DB is that done on the server, or do I change my copy of the DB and re-upload


Thanks for any help
Meltdown

View 2 Replies View Related

Sorry If This Is Newbie-ish But...

Jun 19, 2001

Is it possible to change from integrated security to standard security? Is it something easy or does it take a reinstall.

View 1 Replies View Related

Help For Newbie Pls

Aug 26, 2000

Hi,

I've imported an access .mbd table into SQL 7.0, and need to know the best way to overwrite my SQL 7.0 table with the new Updated information that is contained in the access table. I've read a little bit about update tables, but is there an easy way to overwrite an entire table without having to specify each row and column?

Thanks in advance for any help.

View 2 Replies View Related

Newbie Help

Dec 4, 2002

Ok, not sure if this is where i should post this, but here goes.

I am trying to setup a database to handle RMA stuff at work. I need to be able to access the DB from numerous systems at once. Now i know NOTHING about SQL or any other DB for the most part. Messed around with Access some, but nothing major.

Is there anyone that could help me, explain how, or at least point me in the right direction?

I have MS SQL server 2000. Any help, ideas, or suggestions would be great!!

Thanks in advance :)

View 2 Replies View Related

MS SQL Newbie

Aug 9, 2004

Hey! I',m totally new to Ms SQL Server. I'm currently trying to import a database from LINUX using SQL+ (Oracle) to MS SQL Server. Any suggestions on how this could be achieved would be most helpful

View 1 Replies View Related

Newbie Need Help

Jul 23, 2004

I need to know how to write a sql statement for VB to Microsoft Access for the following criteria.



TblEmployees only Field to be concerned with is EmployeeID -Its PK
TblEmpAttendane has these fields:
EntryID - Pk
EmployeeID - Fk
Date- A text form date validated through vb to avoid hassle
Value-A single digit value that can be alpha OR numeric

To get the Date range for the current month I use variables to store the First and last day of the month(in a CUSTOM calendar control).

I have been trying to use this Sql statement(that wont work):
SqlString = "SELECT * FROM TblEmpAttendance WHERE Date BETWEEN '" & FirstDay & "' AND '" & LastDay & "'"


I need to:
1.)using the current EmployeeID (from TblEmployees)
2.) find the same EmployeeID in TblEmpAttendance
3.)Get the date range for the current month and year(valid days currnt mo.)
-these date are supplied by the variables "FirstDay" AND "LastDay" as seen in above SqlString

4.) Find the Values associated with the dates and EmployeeID

View 8 Replies View Related

Help For Newbie!

Aug 12, 2004

I have a table with 10 records: 10, 9, 8, 7 ... and so on. I want to SELECT the top 3 records starting with the second record on the list (which in this case is 9.) So the result should be 9, 8, and 7. What would be the correct SQL statement for this?

I tried "SELECT TOP 3 * FROM tableXXX WHERE (FieldID<>(SELECT TOP 1 * FROM tableXXX ORDER BY FieldID DESC) ORDER BY FieldID DESC" but sure as heck it didn't work. Can anyone help?

View 2 Replies View Related

IIF - Newbie

Aug 17, 2004

Hi,

just for understanding a simple iif statement:
I like to set a numeric value to 0, if it is smaller than 0.
This expression shall be valid over all dimensions for a specific measure

like Iif([Measures].[Provision Ankauf]<0,0,[Measures].[Provision Ankauf] )

it's not working, Pivottable returns ##VALUE everywhere

View 8 Replies View Related

Please Help Newbie

Nov 16, 2007

Hi

I have two problems. I am currently using SQL Server express and SQL Server Management Studio Express locally. i have a DotNetNuke website running on the web with IHostASP.Net

Story:

I noticed that my SQL Server 2005 database with IHostASP.net was 350MB. It was only 22 2 months ago and I have had about 100 users sign up. I then connected to my live database via SQL Server Management Studio Express and shrunk the database. No errors and the database was reduced to 24MB - Great I thought!

I went and checked the website and all was great for about an hour then the site went down with the following error:

Error The transaction log for database 'classcampers' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

Anyone know what to do.

Anyway, I have downloaded a .bak of my database as supplied by my host. However I cant figure out to restore this file back to my live database. What are the steps involved?

Do I create a new local database from the .bak and then somhow restore this back to my live one, or do i apply this .bak file strainght to my live database using SQLMSE. Any tutorials becuase I have been trying to apply this restore all day

Thansk for any advice in advance
cheers
Albertramsbottom:eek:

View 9 Replies View Related

Newbie

Apr 24, 2008

Hi,
which is current running mostly used version of sql server and what was the previous version?
how can we track down a query bad performance in sql server(like explain plan,stats..etc..in oracle)

Thank you.

View 1 Replies View Related

Help! Newbie In Need!

Jun 3, 2008

Hi guys,

Ive been learning SQL slowly and I need help for a projet I am doing.

I currently would like to compare identical files in a 2 seperate folder. Not only would I like to compare if the files are the same name, but when they are I would like to compare the file contents.

SO basically this is what I need to do:
-Compare file names in folder A with files in folder B
-If a match is found, compare file contents
-If file contents are same, do nothing. If file contents are different, move file to folder C.

Can anyone help me!! :O

Thanks guys!

Gino

View 3 Replies View Related

Newbie DAQ

Jun 6, 2006

I finally decided to do our ASP application using VB, .NET and MSSQL.

My questions are simple, but I cannot find all the answers, so anything you can offer will be greatly appreciated.

Please explain how licenses (CALS) work with regard to Windows Server and MSSQL. For example, suppose we have 200 clients all logged into our application, but only say 40 are currently active (meaning they are adding data, running reports, etc....), but they are not all clicking the "DO" button at the same time. So how many Windows server and/or MSSQL seats, licenses, CALS, cpu's etc.... (whatever they are called) will I need?

How many users do you think a "well designed" ASP application built using AJAX, ActiveX, VB, .NET and MSSQL can a single cpu reasonably support? This application will serve east coast to west coast with heavy traffic from say 7am to 9am and 2pm to 4pm in each time zone. At what point (or what should I look for) to say, you need more memory, more processors, more servers, etc......????

How does one protect (or build in) a method to deal with index corruptions, etc???? Does that occur in MSSQL? If so, generally, what are causes and fixes?

The application will serve many chapters. Many chapters will be solo (by themselves), but we also expect district wide, where multiple chapters (25 to 75) in one district will use the application. We can expect, during time frames mentioned above, that each chapter will have 200 to 400 transactions per am time and same per pm time.

has anyone had great success with IronSpeed?

Lastly, can anyone suggest some good windows web hosting companies?

Thank you.

View 8 Replies View Related

Newbie Help

Jun 24, 2006

Hi i have 2 columns in the same table.....one column retrieves all registered students, the other column retrieved registered students but who have not completed a required survey.

The 2 sql statements are almost the same except that the 2nd one does another comparison at another table....(i.e. where student_id not in (select student_id from other_t).

I am trying to combine the 2 sql statements into a derived table where results will be displayed as follows:

registered students | students(incomplete surveys)

studA, studB, studC | studB
studC, studD, studE | studD, studE

is there any way to do it?

View 2 Replies View Related

Newbie - Where Do I Go

May 1, 2007

The questions in this forum are way beyond me!!!
Need a lower level forum.
This is on my own computer for the purpose of testing web pages.

I have Visual Studio installed. I can start it. Then it tells be to boot to it. I see no options to boot to it during computer start up.

I have no idea where to go to run ASP pages.


All help is appreciated.
Thanks

View 7 Replies View Related

Please Help This Newbie :)

Jun 27, 2007

Hello,

I have a database and in my database there are 5 different tables....

One of the tables is called "dvds" and another one is calles "reports"

What I want to do is, I would like to copy and paste everything in "reports" (column name: dvd) to "dvds" table (column name: name).

And I wan the SQL parameter to check everytime before it writes to "name" column in case that entry is already there. If the entry is already there then ignore and do not write, if it is not there then write it.

I am very sorry about my english and my knowledge on SQL.

Can anyone please help me to product this SQL command?

thank you so much.

Aareth

View 3 Replies View Related

Newbie

Aug 15, 2007

hi i am new to mysql...and please can someone help me to tell a command how to delete a table frm database??

(spam removed)

View 3 Replies View Related

Newbie - Need Help

Dec 8, 2005

Hi,

View 3 Replies View Related

Newbie: Need Help With TRN, LDF, MDF, BAK

Sep 28, 2007



Hi I am new to SQL Server,

I have questions regarding theses files TRN, LDF, MDF and BAK.

I have a maintenance plan that backups the .TRN and .BAK everynight in a folder e:/mssqlsrv/MSSQL/Bakup.
When I look at the date modified in windows explorer they are exactly like I programmed it in the maintenance plan.

Now when I look in the folder e:/mssqlsrv/MSSQL/Data I see the .LDF and .MDF files and they are way out of date.
How do they get copied there? With the maintenance plan? What is the difference between the TRN and the LDF?

How does a restore work? I am so confused? Please explain to me?

View 5 Replies View Related

Newbie: Am I Really Using Everywhere?

Jul 25, 2006

I just went through Steve Lasker's slide show on Everywhere (which was very informative) and noticed that when he setup the connection to the Everywhere database it had a .sdf extension. However, when I look at my database using SQL Server Management Studio Express it shows me as having the standard .mdf and .ldf files and *no* sdf file. I thought for a moment that I might be using Express but when I look at the connection properties of my (or what I think is my Everywhere) database I see:

Product Name: Microsoft SQL Server Desktop Engine

Product Version: 8.0.818 SP3

Instance Name: MICROSOFTBCM

If I look at an Express database, I see connection properties of:

Product Name: Microsoft SQL Server Express Edition with Advanced Services

Product Version: 9.0.2047 SP1

Instance Name: SQLEXPRESS

So it appears that I am not use Express but yet, no .sdf files. Can someone tell me about the different file extensions and which ones I might be using? I would assume with the product name of "Microsoft SQL Server Desktop Engine" I am using Everywhere - but maybe not. Please advise.

Thanks!

View 5 Replies View Related

Newbie Needs Much Help!!!

Mar 12, 2008

Hello All.

I'm really new to SQL Server 2K5 and SSIS. I have a task that seems very simple, but being that I'm very rusty with visual studio and SQL, I'm having all sorts of problems.

Here's the scenario:

I have a text file that has 2 columns. AD LOCATION and UPC, I get the text file by combining two spreadsheets in Excel. I need to examine the rows of the flat file and output that data to multiple files. It's a parent child relationship and the output would simply be the children of the parent in it's own text file. It looks something like this:
TEXT FILE 1.TXT
ADLOCATION UPC
101 XXXXXXXXX1
101 XXXXXXXXX2

101 XXXXXXXXX3
102 XXXXXXXXX1
102 XXXXXXXXX2
103 XXXXXXXXX1

The output files should result in:

TEXT FILE 101.TXT
XXXXXXXXX1
XXXXXXXXX2
XXXXXXXXX3
TEXT FILE 102.TXT
XXXXXXXXX1
XXXXXXXXX2
TEXT FILE 103.TXT
XXXXXXXXX1

Again, I'm brand new to SSIS, have minimal DTS experience and really need to get this automated. Any help at all would be very much appreciated.

Thanks!

Woody

View 6 Replies View Related

Newbie - ? On MsSQL

Feb 28, 2007

I had ms sql server 2000 in my PC.  I am very new to ASP.NET as i have been working on PHP n MySQL for the past 3 years.  Now i am moving to .NET framework 2.  I installed visual studio express 2005 and then sql server 2005. But now that i run sql 2000, it does connect me to localhost.  but on sql 2005 i cant.  can some one shade some light to this.I have not used SQL server before and am just starting to learn it with ASP.NET 2.  I am programmer that likes to code each and every line of codes but ASP.NET is a bit different.  Well anyway, cheers 

View 1 Replies View Related







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