SQL Server Log Show That It's Still Full.

Apr 24, 2001

Hi All,

When I check the log from EM. It sows that it is full. I increased the size of the log(expand) and still not work. I dumped the transaction logs with nolog option this also does not work. Then I run
dbcc checktable(syslogs) and still it is showing the same. When I ran the DBCC
I got the follwing message.
" Checking syslogs
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 18 data rows.
DBCC execution completed. If DBCC printed error messages, see your System Administrator "

Any idea how I can overcome this problem. My sql server version is 6.5.
Also in the message what is the mean that log segment is not on ots own device.

Thanks
Sandy

View 3 Replies


ADVERTISEMENT

How To Show The Full Path Name?

Nov 15, 2007

In SSIS, I put a File System Task in a Foreach Loop Container to do some file operation. I check the Traverse Subfolders in the Loop, and I want to take a look the full path name during operation. I'd like to show the full path name on a message box? How should I do?

Thanks.

View 6 Replies View Related

How To Show ChartFX Reports In ReportServer And How To Show Tooltips For Reports Using Chart Properties

Dec 31, 2007



Hi all,

I have two problems.

1. I downloaded ChartFXRSTrial and created one chart, and able to deploy it in ReportServer, but the problem is the reports are not showing there, i checked the configuration of .dll files in the help provided by chartFX, but couldn't get anything, so could help me on this.

2. How to give Tooltip for the X- axis or Y- axis values in the ReportServer , i tried using chartproperties of .rdl file, but didnt understand it. can help me on this, and one more i tried with Dundas too, If im giving tooltip as #valy then, it is showing samething in reportserver instead the values of 'Y-axis'.

Thanks,
Mahesh Manthena

View 1 Replies View Related

Show SQL Server Messages

Mar 22, 2004

Hello all,
I am making an auction system using C#, .NET and MS SQL Server.
I have a page to add new products to DB, which works fine.

What I like to have is that, I want to be able to show friendly confirmation and error messages to users.

So it is going to work like this:
- user adds a new product
- if successful there is a message on the page that reads: The products (product name) was successfully added to the database. And form fields are clear, ready for the next product info to be entered.
- if not successful, the message should tell the user and maybe indicates the reason too. Like: the product code used already exists.

Currently for the successful attempts I get the form page with all the fields filled with the entered data and for un-successful one the ASP.NET error page.

Can anybody help please? Does anybody knows about a tutorial or an article or ...?

Thanks a lot.

View 5 Replies View Related

Show Contig SQL Server 7

May 20, 2005

After some of the recent discussions on Index fragmentation I've produced this code to do a show contig on all the tables in a specific database on SQL Server 7.

It can probably be made more generic for those interested


CREATE PROCEDURE dbo.sproc_SHOWCONTIG
AS
CREATE TABLE #Tables
(
Table_ID INT IDENTITY(1, 1) NOT NULL,
TableName SYSNAME NOT NULL
)

-- Put all the (user) table names into at temporary table - in order so that the output is in order
INSERT INTO #Tables (TableName) SELECT NAME FROM Shire2.dbo.sysobjects where type = 'U' order by NAME

DECLARE @Current as SYSNAME
--DECLARE @SQL as nvarchar(4000)
DECLARE @ID int


WHILE EXISTS (SELECT 1 FROM #Tables)
BEGIN
--print 'in BEGIN'
-- get current table into a variable name
SET @CURRENT = (SELECT TOP 1 TableName FROM #Tables)
--print 'Current = ' + @current
SET @ID = OBJECT_ID(@CURRENT)
DBCC SHOWCONTIG (@ID)
--EXEC sp_executesql @SQL
DELETE FROM #Tables WHERE TableName = @CURRENT
END



GO

A sarcasm detector, what a great idea.

View 2 Replies View Related

Can I Show My SQL Server Views On A Web Page

Jun 28, 2006

Can i show my view data on a web page is it possible.How can i show the data if it is too large.

View 1 Replies View Related

How Use The Show Server Trace Option.

May 26, 2008

Sir

How to used Show Server Trace option.
Where I got this option in SQL server .
Pls Help me .

Yaman

View 3 Replies View Related

MSDE No Show In Server Explorer

Feb 3, 2006

I have installed default instance of SQLServer 2005 DE on Windows Server 2003 host. I also installed a named instance of MSDE rel A. I can connect to the MSDE instance from Management Studio but it does not appear in the list of servers when I try to add the connection in VS2005 server explorer. What am I doing wrong?

- Dick

View 4 Replies View Related

Full-index Does Not Fully Populate When Doing Start Full Population

Nov 5, 2007

I have sql server 2000. I copied a database from one server to another. I have one table that has a full-text index. When I transferred over the database, the index still existed, but was not populated. I made sure the path for the file is pointing to a new correct location. I did "start full population". It only populated one entry @ 1MB. On the old server the index is 100MB with more than 3 million records.

I tried rebuilding, re-creating, and it all works, but when I run "start full population", it only populates 1 record. I double checked the table in question and it has over 3 million records and proper primary key.

How do I resolve this.

View 1 Replies View Related

HOWTO Show MS Word Doc Stored In SQL Server DB?

May 24, 2008

I have a document that is stored in SQL DB - DBname (doctest.mdf)- Table name(Documents)- Column names(ID, LINK, Content, Adddate, FileType). The doc is named Showme.doc
What I'm trying to do is I have a listview that is linked to the DB. The columns of the listview show LINK and Adddate. The LINK column is a hyperlink.
When the page is loaded the list view shows the info in the DB. The link is a hyperlink so that when I place my cursor over the link it is clickable.
Now how do I make it so that when the user clicks on the LINK the document is retrieved and opened?
I uploaded the document with the fileupload control. If FileUpload1.HasFile Then
Using reader As New BinaryReader(FileUpload1.PostedFile.InputStream)
Dim btcontent As Byte() = reader.ReadBytes(FileUpload1.PostedFile.ContentLength)
cmd3.Parameters.Add("@CONTENT", SqlDbType.VarBinary).Value = btcontent
End Using
end if
I would be thankful for help.
Thanks,
Ty

View 4 Replies View Related

Image Data Read From SQL Server Does Not Show Up

Mar 4, 2004

Hi Guys,

I've been strugling with this problem all morning today.

Basically I store images in SQL Server 2000 database and then whould like to show them with

<img src="viewImage.aspx?image_id=10" border=1>


My table structure is setup this way

TABLE [userImages] (
[imageFilename] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[imageContentType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[imageFileSize] [bigint] NULL ,
[imageFileImage] [image] NULL )


and in viewImage.aspx I have:

if (dr.Read())
{

Response.ContentType = dr.GetString(dr.GetOrdinal("imageContentType"));
Response.BinaryWrite( (byte[]) dr["imageFileImage"] );
}


I have no prolems retrieving the data from DB. But the image does not display(in IE it shows a broken link image)

What's even more puzzling is I CAN display the same image from HDD like so:

FileStream fs = File.OpenRead("D:\my_image.png");
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();

Response.ContentType = "application/octet-stream";
Response.BinaryWrite(buffer);


Am I missing something very obvious. I tried playing around with different ContentType's same result.

In my case I am forced to store images in the DB.

I've seen other examples on the net and theirs work. Please help.

Sincerely,
Vlad Orlovsky

View 1 Replies View Related

Formating A Number To Show $23.49 From Sql Server Into An Asp Web Page

Feb 10, 2000

Hi,
I need to make the format by pulling the number from a table from sql server 7.0 and show the result in a table and have the following format $120,534.45 is that possible.

Thanks
Ali

View 2 Replies View Related

SQL Server 2012 :: Show Empty Output With 0?

Oct 7, 2014

I have a sql query that gets the count of exams held in each month.

Below is the code that I have used.

select Examid, count(*) as CumCount
from [dbo].[Exams] where ExamCategory in ('Major','Critical') and Month(EXOCCRDATE) = Month(getdate())
and Year(EXOCCRDATE) = Year(getdate()) group by Examid

The code works good when we have data for the current month. When we dont have any exams for the current month, the code outputs empty values. I want the code to be altered so that when there is no value returned in the output, i want a default value shown in the output.

I have attached the sample data that I am using. In the data we dont have dates for the month of October. So when I run the code it will display empty output. So what I need is I need a text like 'No Data' to be shown when no value is returned by the query.

I tried using case but it does not work.

View 6 Replies View Related

SQL Server 2012 :: How To Show Only First Friday Of Every Month

Jul 2, 2015

I am having one requirement where I want to show only first Friday of every month of 2014,2015 and 2016 year.

View 9 Replies View Related

SQL Server 2008 :: Show Item Only Once In A List?

Jul 30, 2015

write a query that lists item, mfg serial number, and inspection date. The caveat is that, where there is more than one record for an item, he only wants item listed once. For example:

PartNumberInspectionDateManufacturerSerialNumber
1A144878/4/2013.1101VAS073-7
3L115931/28/2014009VAS206-1
1/29/2014009VAS206-1
2/21/2014009VAS206-1
7/22/2014009VAS206-1
2A285631/1/2015010115ND9CV02
1A203921/3/2015010315ND9PV45
1/4/2015010315ND9PV45
3/1/2015010315ND9PV45
2A2794310/20/20120103700P003

View 9 Replies View Related

SQL Server 2008 :: Only Show Duplicated Records

Aug 4, 2015

I have a query below to show all the records with joining these two tables.

SELECT DISTINCT B.BF_ORGN_CD, B.LEV5, A.BF_ACTY_CD
FROM BF_ORGN A
INNER JOIN BF_ORGN_CNSL_TBL B
ON A.CD=B.BF_ORGN_CD
WHERE A.BF_ACTY_CD IS NOT NULL
ORDER BY B.BF_ORGN_CD,A.BF_ACTY_CD

My goal is only to show all the duplicate records.

Bf_ORGN_CD LEV5 BF_ACTY_CD
AC_21234_2 AC_21200_1 402
AC_21236_2 AC_21200_1 402
AC_21238_2 AC_21200_1 402
AC_29000_1 AC_29000_1 802 ---> NOT SHOW (ONLY 1 RECORD)
AC_29988_1 AC_29988_1 801 ---> NOT SHOW (ONLY 1 RECORD)

[code]...

View 9 Replies View Related

SQL Server 2014 :: Show Sum Of Particular Column In Last Row Of Table

Sep 18, 2015

I have a table with some rows and columns what i want is i want to Show sum of particular column in the last row. This is my code.

SELECT DISTINCT Cluster.ClusterName, Gruppe.GruppeName, Arbeitspaket.ArbeitspaketName, BMWProjekt, AnzahlAP, Abgerechnet, InBearbeitung, Billanz FROM Bestellung
INNER JOIN Cluster ON Bestellung.Cluster = Cluster.rowid
INNER JOIN Arbeitspaket ON Bestellung.Arbeitspaket = Arbeitspaket.rowid
INNER JOIN Gruppe ON Bestellung.Gruppe = Gruppe.rowid
WHERE Projekt ="EA-284-Nxx" AND AnzahlAP <> 0 AND Abgerechnet is 1 AND InBearbeitung is NULL AND Billanz is NULL;

View 4 Replies View Related

SQL Server 2012 :: Show Encryption For Connections

Nov 3, 2015

I have setup ssl encryption for SQL connections by using a self-signed certificate (not the best I know) and setting "Force Encryption" to Yes. Now I am trying to show that the connection is indeed encrypted and I like to see which the ssl-key is used for a connection; preferably the one that I provided. How can I do this? I am just not comfortable trusting the OS or SQL to do what I ask.The query "SELECT encrypt_option FROM sys.dm_exec_connections" Shows incrypted but no extra info.

View 0 Replies View Related

Transact SQL :: How To Show Sum Of Columns To New Column In Server

Jul 8, 2015

I made a select query which shows following output as shown in picture . 

Now I want to add one more column in this query to show current bags  and Bags in these 2 columns i want to show calculation like    in first rows currentbags column (Receivedbags-DeleiveredBags) and in currentWeight column RecivedWeight+loss-gain-Deliverdweight) which is 1400 and  697.5 after that in secound row i want to add frist rows currentbags value+ second rows (Receivedbags-DeleiveredBags) and same in weight like daily stock register so output looked like below image

There is one more column common date according to which i have to make calculation like

rid     commondate   recdate   recbags        recweight             loss gain   delbags    delwght

101215109    01/01/2015   07/01/2015       1400                  697.5                0                  0            0             0
101215110   02/01/2015      08/01/2015         560                    279.64             0              0         0               0

View 7 Replies View Related

SQL Server CE Doesn't Show In Reference Dialog

Jan 29, 2007

I already have VS2005 SP1 installed and after installing :

SQLServerCE31-EN.msi
SSCE31SDK-ENU.msi
SSCE31VSTools-ENU.exe


When I create a Smart Device project and and try to add a reference to SQL Server CE only the old version (3.0.3600.0) shows up. How do I get the new one (3.1) to show up?

View 8 Replies View Related

SQL Server Compact Edition/ Foreign Key Did Not Show

May 29, 2007

Hi,



I have tried to convert my SQL Server Express Database file to SQL Server Compact Edition database file and it successfully. But I have some problem with the FK, I could not see the FK symbol in my new SQL Server Compact Edition database file. So i tried another method to implement the FK which is this code of line here



ALTER TABLE EQMetaData ADD CONSTRAINT Reference FOREIGN KEY ([EQID]) REFERENCES Equipments ([ID])



The second method also has no error but I could not see any FK show. Does anyone has this problem? Any suggestion to solve it? Please do share with me.



Thanks,

Bombie



ps: I attached to sreen shots of my DB, 1 is (SQL Express DB) and another is SQL Compact DB.

http://www.fileden.com/files/2007/5/24/1109807/SQLExpress.png

http://www.fileden.com/files/2007/5/24/1109807/SQLCompactEdition.png

View 1 Replies View Related

When Submitting Form, SQL Server Fields Only Show The First Letter

Nov 30, 2005

Hi, I'm new around here and am stumped.  I have created a form where I submit the information into a SQL Server 2000 table.  When I submit the information through the form, only the first character of each field populates inside of the SQL table.  This happens for every field except for two, zip and comments.  The zip field is numeric and the comments field is text.  All the other fields are varchar fields; and these are the fields with the problems.  I have attempted to change the data type to text, but that did not work either.  I am doing this through a stored procedure I created.  Here is the asp code:
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents txtFirstName As System.Web.UI.WebControls.TextBox
Protected WithEvents txtLastName As System.Web.UI.WebControls.TextBox
Protected WithEvents txtAddress1 As System.Web.UI.WebControls.TextBox
Protected WithEvents txtAddress2 As System.Web.UI.WebControls.TextBox
Protected WithEvents txtCity As System.Web.UI.WebControls.TextBox
Protected WithEvents txtZip As System.Web.UI.WebControls.TextBox
Protected WithEvents txtEmail As System.Web.UI.WebControls.TextBox
Protected WithEvents txtPhone As System.Web.UI.WebControls.TextBox
Protected WithEvents txtComments As System.Web.UI.WebControls.TextBox
Protected WithEvents ddlState As System.Web.UI.WebControls.DropDownList
Protected WithEvents ddlGift1 As System.Web.UI.WebControls.DropDownList
Protected WithEvents ddlGift2 As System.Web.UI.WebControls.DropDownList
Protected WithEvents ddlGift3 As System.Web.UI.WebControls.DropDownList
Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Protected WithEvents SqlCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection()
Me.SqlCommand1 = New System.Data.SqlClient.SqlCommand()
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "data source=NDAVENPORT2;initial catalog=Bluestreak;integrated security=SSPI;persi" & _
"st security info=False;workstation id=NDAVENPORT2;packet size=4096"
'
'SqlCommand1
'
Me.SqlCommand1.CommandText = "dbo.[InsertFreeOrders]"
Me.SqlCommand1.CommandType = System.Data.CommandType.StoredProcedure
Me.SqlCommand1.Connection = Me.SqlConnection1
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@firstname", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@lastname", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@address1", System.Data.SqlDbType.VarChar, 100))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@address2", System.Data.SqlDbType.VarChar, 100))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@city", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@state", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@zip", System.Data.SqlDbType.Decimal, 9, System.Data.ParameterDirection.Input, False, CType(18, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@email", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@phone", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@item1", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@item2", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@item3", System.Data.SqlDbType.VarChar, 50))
Me.SqlCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@comments", System.Data.SqlDbType.VarChar, 2147483647))
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
If IsValid Then
SqlCommand1.Parameters("@firstname").Value = txtFirstName.Text
SqlCommand1.Parameters("@lastname").Value = txtLastName.Text
SqlCommand1.Parameters("@address1").Value = txtAddress1.Text
SqlCommand1.Parameters("@address2").Value = txtAddress2.Text
SqlCommand1.Parameters("@city").Value = txtCity.Text
SqlCommand1.Parameters("@state").Value = ddlState.SelectedItem.Text
SqlCommand1.Parameters("@zip").Value = txtZip.Text
SqlCommand1.Parameters("@email").Value = txtEmail.Text
SqlCommand1.Parameters("@phone").Value = txtPhone.Text
SqlCommand1.Parameters("@item1").Value = ddlGift1.SelectedItem.Text
SqlCommand1.Parameters("@item2").Value = ddlGift2.SelectedItem.Text
SqlCommand1.Parameters("@item3").Value = ddlGift3.SelectedItem.Text
SqlCommand1.Parameters("@comments").Value = txtComments.Text
SqlConnection1.Open()
SqlCommand1.ExecuteNonQuery()
SqlConnection1.Close()
Response.Redirect("Success.aspx")
End If
End Sub
End ClassMy stored procedure looks like this:CREATE PROCEDURE dbo.InsertFreeOrders  (  @firstname varchar( 50 ),  @lastname varchar( 50 ),  @address1 varchar( 100 ),  @address2 varchar( 100 ),  @city varchar( 50 ),  @state varchar( 50 ),  @zip numeric,  @email varchar( 50 ),  @phone varchar( 50 ),  @item1 varchar( 50 ),  @item2 varchar( 50 ),  @item3 varchar( 50 ),  @comments text  )ASInsert FreeOrders ( o_first_name, o_last_name, o_address_1, o_address_2, o_city, o_state, o_zip, o_email, o_phone, o_item_1, o_item_2, o_item_3, o_comments ) Values ( @firstname, @lastname, @address1, @address2, @city, @state, @zip, @email, @phone, @item1, @item2, @item3, @comments )GOSo it is working, just not completely and I am stumped here.  Any help would be great!  Thanks.

View 6 Replies View Related

SQL Server 2008 :: Show Different Last 6 Month In Format DD-MM-YYYY?

May 15, 2015

How I want to see the below dates via 6 different Select Statements but I am unsure how to get this?

01-May-2015
01-Apr-2015
01-Mar-2015
01-Feb-2015
01-Jan-2015
01-Dec-2014

I have this Select statement

select replace(convert(char(11),getdate(),113),' ','-')

But it is returning the 15-May-2015 and it should be 01-May-2015 for this select statement

View 4 Replies View Related

SQL 2012 :: How To Show All Files Uploaded To Server By A User

Oct 16, 2015

In our new app, a user is given the option of uploading one or files to the server and saving the filename and path to the database.

We would like to display all files associated with a particular user.

Obviously, the code below is only displaying one file.

How to display all files associated with a particular employee?

select ROW_NUMBER()OVER (ORDER BY empID) as empnum , fName, filePath from Employee where EmpID='KF14170';

I might add the format of the file is empID plus the filename:

Example: KF14170Evidence1, KF14170Evidence2.

View 1 Replies View Related

Show Server Trace Missing In SQL Management Studio?

Feb 9, 2006

In Query Analyzer I could go to the Query menu and select Show ServerTrace and it would give me trace information with duration, CPU, Readsand Writes cost. I have been using SQL Server 2005 for a couple monthsnow and I can't seem to find that option in SQL Management Studio. Am Imissing something?Jason

View 1 Replies View Related

Show Me Demo Of How To Create Foreign Key In SQL Server 2000

Dec 5, 2007



show me demo of how to create foreign key in SQL server 2000

thank you
maxs

View 1 Replies View Related

Can Not Show Table Data From The SQL Server Comact Edition

Apr 28, 2008

I'm getting the error message "The parameter is incorrect" when I'm trying to perform "Show Table Data" from the SQL Server Compact Edition" within VS 2008. Any ideas? Thank you in advance,
.

View 6 Replies View Related

Linked Table From Server To Access Doesn't Show Data?

Oct 25, 2013

I linked an SQL server table into Access, but when I open the table in Access, no data shows. Do I need to set some permissions on the sql table?

View 1 Replies View Related

SQL Server Admin 2014 :: BAK File Does Not Show In Restore Window

Jan 10, 2015

I have a windows 8 pc that I just got and installed sqlexpress 2014. My buddy haw windows 7 and installed sqlexpress on his pc. We create a db on his pc, did a backup, copied the backup to my pc. In ssms I right click on "database" > restore database. click device and the button to find my file. I navigate to the folder where the file shows in file explorer but the .bak file does not show in ssms to restore from. This is probably a windows thing but I have don't know what to look at.

View 4 Replies View Related

SQL Server 2008 :: Query To Show XML Output For Hierarchical Data?

Mar 10, 2015

selecting table data in hierarchical XML .

Here is the sample table DDL and data

Declare @continents Table
(
id int identity (1,1)
,continent_id int
,continent_Name varchar(100)
,continent_surface_area varchar(100)
,country_id int

[code]....

View 8 Replies View Related

SQL Server 2008 :: How To Change Query So Apple Does Not Show Up In List

Apr 2, 2015

I am trying to print Companies with less than 100 employees for all dates.Here's my table structure

Create table CompanyEmployeeArchive(
Company varchar(100) not null, Employees int, Dateinserted date)

Insert into CompanyEmployeeArchive values('Microsoft',1001,'2015-01-01')
Insert into CompanyEmployeeArchive values('Microsoft',1050,'2015-02-01')
Insert into CompanyEmployeeArchive values('Microsoft',1600,'2015-03-01')
Insert into CompanyEmployeeArchive values('IBM',10,'2015-01-01')
Insert into CompanyEmployeeArchive values('IBM',80,'2015-02-01')
Insert into CompanyEmployeeArchive values('Apple',90,'2015-01-01')
Insert into CompanyEmployeeArchive values('Apple',900,'2015-02-01')
Insert into CompanyEmployeeArchive values('Apple',1000,'2015-03-01')

I want companies that have employees less than 100 for all dates i.e. Only IBM. Apple has < 100 employees only on one month.Select Company, dateinserted, employees from CompanyEmployeeArchive group by company,dateinserted,employees having employees < 100 order by company, dateinserted this query lists Apple too. How can I change the query so Apple does not show up in the list.

View 4 Replies View Related

SQL Server 2005 &&>&&> - ? Need Equivalent Command ? - Show Tables&&>&&> (MySql)

Feb 19, 2008

Hi Guys,

well as you can see from my thread SQLServer is new to me i am used to mysql and i c'ant find the equivalent anywhere on the net... Seams easy enough but i have been at it for 6 hrs and i give up... I am just making a quick database view tool. So please tell me.

How do i load the all tables of a database via an sql command?

Since it took me a while to find this i thought migth as well slap ip somewhere so here is the command to load all data bases... In any case worked for me so...

- > select * from master.dbo.sysdatabases;

And where in the ... can you find a reference to all sql server commands? ... Please.

Thanks for your help

View 4 Replies View Related

SQL Server 2012 :: Finding Duplicates And Show Original / Duplicate Record

Nov 3, 2014

There are many duplicate records on my data table because users constantly register under two accounts. I have a query that identify the records that have a duplicate, but it only shows one of the two records, and I need to show the two records so that I can reconcile the differences.The query is taken from a post on stack overflow. It gives me 196, but I need to see the 392 records.

How to identify the duplicates and show the tow records without having to hard code any values, so I can use the query in a report, and anytime there are new duplicates, the report shows them.

SELECT
[groom_first_name]
,[groom_last_name]
,[bride_first_name]
,[bride_last_name]

[code]....

View 5 Replies View Related







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