What is MSSQLServers main purpose?

228 byte By code? at 2007-11-20 2:01:08
im new in the MSSQLServer, but i've had the program for 5-7 months, and i dont even know what to use it for. yea i tried to find some tutorials on just sql, but... is it for use with a program, or the web, or both, or what?

Select emp names

83 byte By maru143 at 2007-11-20 2:04:05
I want to retrieve all employee names from employee<br/>whose joining date is same.

append variable to name.

446 byte By jstephens at 2007-11-20 2:04:47
I am trying to create a backup of my transactional logs. what I want is to create a variable with the date and time. Then use that variable as part of the backup name. Here is what I got.declare @bkupdate datetimeset @bkupdate = getdate()BACKUP LOG CA001 TO DISK = 'S:\AZTARGP\CA001\' + @bk...

DB2 performance (waits)

1071 byte By jdt at 2007-11-20 2:05:06
HiI have a table with a numeric Primary Key. This key is composed of NNRRRRRRRRR where NN is the week since the system went live and RR is a randomly generated number. Multiple programs simultaneously try to read data from this table while others could be creating records on it at the same time. Thi...

Using floats in MySQL

2495 byte By Nibinaear at 2007-11-20 2:05:59
I'm having trouble adding floats to my database:CREATE TABLE jobs( job_id int(11) auto_increment not null, job_title varchar(100) not null, job_details text not null, job_hourly_rate double(2,2) null, job_yearly_rate int(8) null, job_hours int(3) null, job_duration enum('permanent&#...

Joininig Table

1116 byte By johnsonlim026 at 2007-11-20 2:07:04
Hi,I am writing a stored procedure and face the following question. f1 is the primary key and foreign key in table A and B accordingly .I am joining both the table in order to get f2 in Table BTable A Table B======= ========f1 f1 f2--...

How to set password to MDB. file in vc++

79 byte By anji_m8 at 2007-11-20 2:09:16
MY IDE is vc++ 6.0 how to set password to mdb files in dynamically or programme

[SQLServer Express]how to copy a database to another computer

355 byte By jhammer at 2007-11-20 2:09:41
I have a database defines in my SQL Server Express.I installed SQL Server Express on a different computer.I want to copy my database from the old computer to the new one.What are the steps that I need to take in order to copy all the tables schemas and data?(I don't have any security or other a...

Saving enum to Sql Server

128 byte By jhammer at 2007-11-20 2:09:59
How do I save an Enum type in SqlServer?<br/>Also, I know I can store an entire object in SqlServer 2005. Does someone know how?

UDTs to Stored Procedure

1061 byte By sameerteni at 2007-11-20 2:10:12
Hello,I have defined a user defined type in C# and DLL is registered with SQL server. I could access defined UDT that in Stored procedure or in SQL query. But when I define stored procedure and tries to execute it, the following error occures - ".NET Framework execution was aborted because of stack...

sql query to generate counts by month

864 byte By letheology at 2007-11-20 2:10:30
I have a database table with a bunch of transactions. Each transaction has a company and date associated with it. I want to generate a table which has 12 columns, one for each month, and a row for every company. I want each entry to be the number of transactions in the column month with the row c...

MySQL partial SELECT?

262 byte By portnov at 2007-11-20 2:12:50
Hello, i have small problem and wondered if anyone here knows,<br/>Lets say i have field with array sized 100 and i want to get only the first 50 chars, can it be done on MySQL level? or i have to get entire data field and then removing the last 50 chars?

Dumps Oracle

1433 byte By ALREMTULLA at 2007-11-20 2:13:20
Dear Friends,I have a problem in taking a dump of oracle by using the schedule tasks.I have created two files. The first file is the Batch file which is having this details:.Exp USERID=sharp_tz/sharp_tz@TEST PARFILE=C:\DatabaseImp\EXPCDG.IMPThe second file is the EXPCDG.IMP file which is having the...

Sql standalone

288 byte By JeI-Paradigm at 2007-11-20 2:13:37
:rolleyes: Is it possible for a sql server database to standalone.<br/> <br/>IE: Can i access the sql database without having an instance of sql server from an application i create in vb.net or the like<br/> <br/>Or do i have to use something like access or mysql?<br/> <br/>Thanks<br/>J!

I wish Id paid more attension in SQL class!

2044 byte By HairyMonkeyMan at 2007-11-20 2:17:22
:confused: :confused: :confused: I'm using Microsoft SQL Server Hello there :) This one is a bit of a head scratcher. I haven't been able to get this into a query that would finish running before christmas!!Basically, I've been developing something along the lines of TimeTracker (...

VB6 and Sql Server/Express - Boolean to Bit !

775 byte By hbkelkar at 2007-11-20 2:18:40
hi gurus,I'm writing my applications in vb6 and was using Access as backend. Now i've migrated from access to Sql Server / Express 2005. Here im facing a problem. My program used a table where there is a boolean(True/False) field. When i converted (from import utility in Sql Server) acc...

How do database repository file work?

264 byte By Paul Rice at 2007-11-20 2:19:07
I don't know if this is the best place to put this but here goes?<br/>Does a database rewrite it's file everytime new data is stored? Is it able to selectively remove parts of it's file when data is to be deleted?<br/>Thanks,<br/>Paul

Cant connect to database in visual c++ 2005

394 byte By 2MuchRiceMakesMeSick at 2007-11-20 2:21:52
OleDbCommand aCommand = gcnew OleDbCommand();gives me the errorForm1.h(173) : error C2248: 'System::Data::OleDb::OleDbCommand::OleDbCommand' : cannot access private member declared in class 'System::Data::OleDb::OleDbCommand'i have using namespace System::Data::OleDb; defined...

What is SQL?

300 byte By Brenton S. at 2007-11-20 2:23:16
Hi all,<br/> <br/>I have been wondering, where do you put SQL query code? Do you put it inside along with HTML code? I have searched all over the internet for tutorials and have gotten books from the library but I am still lost. If anyone could please help, I would appreciate it. Thanks in advanced....

fomular in table SQL

276 byte By luckroth at 2007-11-20 2:23:47
I have two tables(Table1 and Table2). <br/>property Table1<br/>IDTest1 int<br/>IDTest2 int<br/>Property Table2<br/>IDTest3 int<br/>IDF (formular)<br/>can i used field IDTest2 in table1 in the formular in the table2?<br/>many thank for your help

recursive trigger?

558 byte By luckroth at 2007-11-20 2:23:49
hi all. i want a trigger that can do in loop. for example:it is recursive trigger. --------------------------CREATE TRIGGER UpdateStudent On tblStudent FOR Update asDECLARE @studentid intSELECT @studentid=studentReg FROM tblStudent WHERE Status=2UPDATE tblStudent SET Status=2 WHERE StudentID=@Studen...

Advice requested: LinuxODBC vs. DTL

969 byte By Schmoe at 2007-11-20 2:24:53
I'm on a project which is migrating from a standard client-server environment to a SAN cluster running RedHat. For technical reasons, the current use of the Berkely DB is no longer feasible, and I'm responsible for replacing it. Unfortunately, the data access is deeply embedded in the e...

Paging in MySQL query

351 byte By dacky at 2007-11-20 2:25:29
hi im using MySQL database. Is it possible to page when you retrieve records from the database? Like for example i have 1000 records, I would like to view the first 100 then when i click another button i would like to view the next 100(101-200) and so on and so forth until it will reach 500. I hope...

Counting Specific Characters

308 byte By MonteyPython at 2007-11-20 2:26:11
Is there a way I can count the number of a specific characters of a string in Oracle?ie. conting dashes of "0052-2901-AA8KP-1" = 3perhaps something like this?select stringfield, Character#command(stringfield, "-") from imagination where anyhelp>0 and appreciation=(anyhelp)^2...

Insert.. select..left join

663 byte By lucia at 2007-11-20 2:26:48
Hi, I am new here. Hope some one can help me out.I use sql server database and vb6 as front end.I want to insert data from table1 to table2. These two tables are exactly the same. But I want to left join table1 with table3 with some criteria. Here is my code.Sql = "Insert table2 select Table1.*, tab...

The equivalent C# Interlocked.Increment() in MySQL ?

939 byte By mikoil at 2007-11-20 2:26:54
Hi!I have this task:I have a MySQL table (database) with this records:ID File~~ ~~~1 f1.dat2 f2.dat3 f3.dat4 f4.dat And this table that holds only 1 record which is the current id, eg:CurrentID~~~~~~{x} I need my cgi to increase the Curr...

SQL Server 2005 Reports

1287 byte By Mutilated1 at 2007-11-20 2:27:04
I bought this book Professional SQL Server 2005 Reporting Services ( http://www.scary-software.com/Details/Books/0764584979) to help me work out some reports that I need to write. So far its helping me out pretty good by following the examples and stuff.The thing is I have Visual Studio 2005 on my m...

How to load jpeg file in SqL2000 and how to retrieve from SQL2000.

143 byte By Parameswar at 2007-11-20 2:27:41
Hi friends<br/> Now I am working in SQL2000 as back end .I want to load jpeg file in database and retrieve from database. Please guide me.

Microsoft clustering services and multiple active nodes

736 byte By mahanare at 2007-11-20 2:29:34
Hi,I have a query about MSCS. Is it possible to have 2 SQL servers (on different physical machines) and still active? for now i am not bothered about the passive nodes which work as failure.What i am intended do is that, i will have 2 SQL servers across WAN (US and Europe) within the client network....

connecting to SQLexpress through VB

970 byte By psasidisrcum at 2007-11-20 2:30:05
Hi all,I have SQL server express edition 2005 installed on my computer and using VB in MS Access to run some queries. The VB function looks something like this..Dim dataRS As New ADODB.RecordsetDim cnnSQL As New ADODB.ConnectionSet cnnSQL = New ADODB.ConnectioncnnSQL.ConnectionString = "Provider=SQL...

ADO raw_Execute fails

502 byte By joecre at 2007-11-20 2:32:37
Hi everybody, I've a select on my DB based on a view, when I try to retrieve data using this select statement I've noticed a raw_Execute first chance exception on my ADO wrapper, calling raw_Exceute method. The returned recordset contains field descriptions but when I test ADOEOF property...

Distributed Transaction Problem

709 byte By Scott.Macmaster at 2007-11-20 2:32:53
I'm using a linked database (SQL Server 2000) and can do any kind of query I want but I can't get them to work within a transaction. The error message I get back isThe operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed trans...

How to Aggregate field text values from rows thru view / stored proc?

653 byte By kulas at 2007-11-20 2:33:04
How to create a SQL view or thru a Stored Procedure...That aggregates field text values from rows?Example.--Table Rows---GroupID MemberName ' Fields GroupID and Membername1 Member11 Member21 Member32 Member...

#1005 - Cant create table Error

1696 byte By Nibinaear at 2007-11-20 2:34:02
I'm trying to create my tables in phpmyadmin and they work perfectly in MySQL 5, but I get the following error in "MySQL 4.0.24_Debian-10".#1005 - Can't create table './118tracker/news_archive.frm' (errno: 150)I've researched the problem and all I get it "create and index on...

sql 2000 problem: Insert data to an external table

429 byte By lucia at 2007-11-20 2:35:06
I am using vb6 and sql server 2000.I want to insert rows from server table called table1 to table2 located in C:\program File\sample.mdbHere is my code:sql="Insert into table2 in 'C:\program File\sample.mdb' "sql = sql & " From table1 "sql = sql & "Where ....."I got an error msg: Incorrect...

Mssql 2005 Dts

205 byte By roger5089 at 2007-11-20 2:35:58
dear all <br/>does any information i can reference to mssql 2005 to design my DTS .? <br/>for example i can use this funtion in mssql 2000 but i do not know how? how can i start with DTS in mssql 2005

Trouble with SQL Task Output in DTS

1018 byte By TSmooth at 2007-11-20 2:37:02
Using SQL Server 2000, I have created a DTS package. This package contains an "Execute SQL" task which runs the following stored procedure:CREATE PROCEDURE dbo.SyncStartASINSERT INTO tblSyncLog (SyncStart, SyncStatus)VALUES (GetDate(), 'In Progress')SELECT @@Identity As NewSyncID;The Execu...

For loop in SQL

113 byte By johnsonlim026 at 2007-11-20 2:37:35
Does SQL support For loop?Cause i fail to find any syntax for for loop in Help for SQL server.Can anyone tell me?

I jolly well have preserved my keys but Oracle doesnt believe me...

3179 byte By cjard at 2007-11-20 2:38:39
HelloI'm trying to run and update in the following way:UPDATE( SELECT * FROM some_table INNER JOIN ( SELECT primary_key FROM ( SELECT primary_key, row_number() OVER(PARTITION BY some_columns_with_duplicates ORDER BY primary_key) AS window_function_result FROM some_table...

difference between varchar and nvarchar

121 byte By Nagham at 2007-11-20 2:40:37
Hi therenI need to know what is the difference between varchar and nvarchar in SQL 2005 and wich type is preferable...Thx

Identity Column in MSSQL 2000

489 byte By erickwidya at 2007-11-20 2:40:49
i have an identity column with value 1, 2, 3 if i delete the #3..the new record will inserted using 4 as the identity..is there a way to use 3 as the identity since it's not there yet?and if i delete all records in that table..the new record will inserted using 4 too as the identity..is there a...

Jet 4.0 Can I delete from multiple tables?

490 byte By drewsirrom at 2007-11-20 2:41:11
Does anyone know if it is possible to delete from more than one table using a single SQL DELETE statement in MSAccess? I failed with Query Builder using code like:DELETE Bookings.*, Customers.*FROM Bookings INNER JOIN Customers ON Bookings.ID = Customers.BookingIDWHERE Customers.ID = 3;I put in a re...

Problem with password validation

588 byte By ashkumar at 2007-11-20 2:41:33
I'm getting data from two ACCESS database by the query below -SELECT DISTINCT T1.*FROM [c:\Database1.mdb].BILL AS T1, [c:\Database2.mdb].BILL AS T2WHERE T1.BillNo & T1.Billdate IN(SELECT BillNo & Billdate FROM[c:\Database2.mdb].Bill);I'm getting desired result & I've completed my appl...

help with SQL queries please

715 byte By monkeymafia at 2007-11-20 2:42:35
hicould anyone please help me some SQL queries?i have the following tables: http://img.photobucket.com/albums/v635/monkey_mafia66/tables2.jpgand just needed help on constructing these SQL queriers:1. show a list of the sponsers and which elephants they sponser. include sponsers name and amount sponse...

UPDATE on Self referenced Table

1750 byte By vinitsankhe at 2007-11-20 2:42:42
Hi Guys,I use MS-SQL SERVER 2005. Where I have 2 tables ... OZIM_LOCATION & TEST_LOCATIONTheir Structure is ...OZIM_LOCATION(LOC_ID varchar(50), NEIGHBOR_LOC_ID Self Foreign Key of LOC_ID)TEST_LOCATION(LOC_ID varchar(50), NEIGHBOR_LOC_ID varchar(50))TEST_LOCATION is actually the copy of OZIM_LOCATIO...

sublcass table

818 byte By monkeymafia at 2007-11-20 2:42:51
helloi have 2 tables: employee and volunteer.ive made volunteer a subclass of employee as volunteers are given a temprorary employee ID. this seemed to make sense.as a result i have the following tables:EMPLOYEE:employee no (PK)job titleaddresshome telmobile numbergender dobVOLUNTEEREmp No(PK)arriva...

String Concatenation problem

662 byte By johnsonlim026 at 2007-11-20 2:44:06
I faced the problem where the SQL server fail to concatenate two integer but instead sum up the two integer.My code is as below:WHILE @counter<=len('@Wh125-Loc1') BEGIN if (substring('@Wh125-Loc1',@counter,1)='-' ) BEGIN set @result='10' BREAK E...

Quick char/varchar question

242 byte By disruptivehair at 2007-11-20 2:45:05
Hi...I'm not sure if this is true but I've heard some DBAs say that it's better to use char(1) instead of varchar(1) for a column that will only contain one letter and that is never null.<br/>Just wondered if this is true.

Help! Excel to Crystal report

1667 byte By M-Asif at 2007-11-20 2:45:43
HelloI have to develop a report in crystal report 10. I am new to crystal reports. Sample is given in an Excel file. It has two parts first is pivot table & second is Table which perform some calculations based on following two input values from pivot table (I guess this can be a running field or fo...

stored procedure error

1252 byte By Sairan at 2007-11-20 2:46:35
hello,i'm creating a stored procedure that will give me the structure of whichever table name i provide it with.the stored procedure i'm using isCREATE PROCEDURE Describe_table (@table_name varchar) AS SET NOCOUNT OFFSelect * from table_nameGOthe code i'm using to run this procedure i...