difference between 2 dates in hh:mn:sec format

328 byte By satish2 at 2007-11-20 10:12:19
Hi all,How can we write an function in sql server 2000 which takes 2 parameters of datetime datatype and returns teh diffrence bewteen the two times in hh:min:sec format.eg:@dt1 '12/05/2007 12:21:25'@dt2 '12/05/2007 14:45:02'diffrence='02:23:37'anyone?...

sql2K

308 byte By cs8 at 2007-11-20 10:13:34
i connect to remote sql2k server using my vc++ project. It works fine except that recently i revised my query in such way that I use Create table #temptable .. when i add fields to this table like more than 5 or 6 it suddenly disconnects and UI disappears. i do not have the actual code with me. any...

last modified?

147 byte By codeexpert123 at 2007-11-20 10:14:02
Does anyone know if oracle saves "last modified" data? I want to use this in a archiving tool by only querying for data after/before certain dates.

[RESOLVED] how to check if linked server exists ??

416 byte By mansoor_aziz at 2007-11-20 10:14:08
Hi,i want to check whether the linked server exists or not before running sp_addserverlink, if any one knows the query for checking the existence of linked server plzz tell me.right now i am gettin this error Msg 15028, Level 16, State 1, Procedure sp_addlinkedserver, Line 79The server 'vbserve...

Dynamically created DATEDIFF function

556 byte By yaron-b at 2007-11-20 10:19:45
HiDoes anyone know if I can dynamically create a DATEDIFF function within a query.Example:SELECT * FROM myTableWHERE (DATEDIFF(intervalCode, lastExecution, GETDATE()) >= intervalNumber)As you can see, I filled up all the arguments with data from columns. The problem is that the first argument (un...

Get *.mdb database for Sql Server data base

211 byte By CoolStar at 2007-11-20 10:20:33
Hi All,<br/>I have a data base created using sql server 2000, and I want to generate *.mdb data base for one of the table of Sql server. <br/>Can we generate the same programatically?<br/>Thanks!!

[RESOLVED] MySQL unknown column error...

1224 byte By gilly914 at 2007-11-20 10:22:16
Hey There,I created a working SQL statement that looked somethig like this :SELECT DISTINCT car_dealer.IDFROM car_dealerRIGHT OUTER JOIN dealer_company_links ON dealer_company_links.DEALER_ID = car_dealer.IDRIGHT OUTER JOIN type_company_links ON type_company_links.ID = dealer_company_links.TYPE_COMP...

[RESOLVED] Complex ORDER BY statement help!...

617 byte By gilly914 at 2007-11-20 10:22:28
Here's my problem :I have one table called "users" that has a list of users (fields : ID, Name, Country, etc.) and another table called "user_ratings" that has a list of ratings that each user recieved (fields : USER_ID, RATING).In order to get a users rating i would use :SELECT AVG(RATING) fro...

Is this advisable

878 byte By George1111 at 2007-11-20 10:22:37
Database Access 2000I am updating tables as follows StrSql = "SELECT * FROM Stock WHERE [GRP] = '" & StGrp_Code & "'" RsStock.Open StrSql, Db, adOpenDynamic, adLockPessimistic On Error GoTo E1 If RsStock.RecordCount < 1 Then 'ADD NEW RsStock.AddNew RsStoc...

Running sqlncli.msi on a Windows 98 system...

497 byte By tim8w at 2007-11-20 10:24:10
How can I get the 'sqlncli.msi' installation to run on a Win98 box? When I try and run it I get the following error:"This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Install...

Access 2003 - Transfer database

1230 byte By AlecJames at 2007-11-20 10:26:58
HiI have an Access 2003 project connected to a sql server express database. I used the "Database Utilities->Transfer database" to replicate the database on a sql server 2000. The include data check box was checked. The transfer failed. It creates the tables and fields correctly but does not c...

Delay in Writing to Database

461 byte By George1111 at 2007-11-20 10:27:22
Using Access 2000 and VB6 ADOThere seems to be a 5- 10 second delay after data is written to the database before it relects in enquiriesIs this normal ?Tables are opened as follows StrSql = "SELECT * from STOCKGROUPS" RsADO2.Open StrSql, DbADO, adOpenKeyset, adLockOptimisticWhat should I be us...

quote strings help

743 byte By cht104 at 2007-11-20 10:28:03
I'm trying to export data from a Sybase Adaptive database. To import into the other software, all fields must be enclosed in " ". With SQL options, I can get the quotes around the name fields, but not the SUM fields. Here's an example of what I'm using:SELECT e.last_name + ' &...

check for any schema mismatches in two databases

406 byte By number7 at 2007-11-20 10:29:40
My Current replication process truncates the data first and then tries to replicate the data later. If a table schema had a mismatch, the replicate process would fail leaving the tables with no data. I need to modify the process to check for any schema mismatches first and then replicate the data la...

GROUP BY returns zero rows...

421 byte By gilly914 at 2007-11-20 10:31:33
I have an sql query that looks like this :SELECT table.ID , AVG(*) as AVERAGE , ... , ... from table WHERE X > 200 GROUP BY table.ID ORDER BY AVERAGEthis query qorks great...everytime there's more than one row in the table, but when theres only one row, it returns zero rows!I think this is b...

Help! Werid Problem

1099 byte By xusword at 2007-11-20 10:35:04
Here is a part of a method of mine FOR sub IN subs LOOP billing_id_global := sub.billing_id; IF (v_counter = max_trx_in) THEN DBMS_OUTPUT.PUT_LINE(trx_hdr ||' '|| countstr ||' - commit point reached'); COMMIT; v_counter := 0; EN...

Oracle File Extension - EASY QUESTION

182 byte By MeatLander at 2007-11-20 10:36:10
What is the extension for an oracle database file?<br/>What is the extension for an oracle log file?<br/>IE: Access = *.mdb<br/>SQL Server = *.mdf | *.ldf<br/>Oracle = *.? | *.?

Database dictionary model

449 byte By yoyosh at 2007-11-20 10:36:27
There is a model in databases, called Dictionary. Most of the times it consists of Dictionary and DictionaryElement tables. The main idea behind that model is to give to all elements an unchangeable identifier, and a changeable description (Name and Alias). Could anyone give me some hints on how to...

Oracle Text Editor and Developer2000

178 byte By Muntaha at 2007-11-20 10:36:57
i am new to oracle please some one tell me how can i run both oracle <br/>text Editor and developer on the same machine. i tried my best but fail.<br/>please help me. its urgent

Graphs Preview problem in SSRS 2005

603 byte By WarlockSoul at 2007-11-20 10:38:47
Dear Guru's,I have four graphs in a 2 x 2 matrix. The graph alignments look fine in the layout view but when I preview them the horizontal graphs have a gap of about 2 inches between them while the vertical graphs remain the same as the lay view.The graphs are made of the dataset of:FiscalM, F...

how to generate product code variants/permutations?

961 byte By researchbank at 2007-11-20 10:42:59
Hi,I'm using MS Access and have a table with products.The table has for example:- productid = G02-020production description = T-ShirtThe first digit (G) denotes clothing and there are 5 colour variants and 5 size variants...I want to generate new productid codes and product descriptions for the...

how to reuse an existing recordset

164 byte By jatinkulkarni at 2007-11-20 10:44:15
I am using V++, MYSQL and ADO. I have an already existing opened recordset. I wan't to use the same recordset for executing different SQL. How to achieve that.

queryby date

222 byte By ikcha at 2007-11-20 10:44:29
sql2000; is this best safest way to query by date?. what if output is null?.<br/>select ride_number as ridenum from <br/>clubA where Driver_name = 'Gary' and<br/>clubA.Date_Time = '4/12/1999 8:28:01 PM'

how to randomly select a row from a table having more then one row with same id

758 byte By meenakshi_joshi09 at 2007-11-20 10:45:52
Hi all,I have a table Employee having columns as EmpId , EmpName and ProjectName. An Employee can be involved in more than one project, So the table structure is as below:EmpId EmpName ProjectName1 jane P11...

Print Status in SQL Server 2000

467 byte By stin at 2007-11-20 10:51:11
I have a stored procedure, which in turn calls numerous stored procedures. What I'd like to to is in between calls to the stored procedures is print a line saying, 'Finished with sp1'. I of course tried putting "Print 'Finished with sp1'" in between the calls, I also tried...

[RESOLVED] Whats wrong with this SQL

715 byte By Bill Crawley at 2007-11-20 10:52:45
Hi All,I have scripted the following:select s.id, s.sorcode, s.description, n.name as nature, u.name as unit, s.quantitymandatory, s.defaultcost, s.natureid, s.unitid from dbo.sor s left outer join dbo.unit u on u.id = s.unitid left outer join dbo.nature n on n.id = s.natureid where Ac...

RUN script

259 byte By anandtugaon at 2007-11-20 10:52:55
Hi,<br/>How to run a script before the ORACLE SHUTDOWN durning system shutdown ?<br/>Please suggest me How to set priority durning run shutdown time ffirst we run a script and after shutdown oracle than shutdown a system?<br/>Thanks in Advance

Insertion

114 byte By maverick786us at 2007-11-20 10:53:43
Is it possible to INSERT records in multiple tables using a single query? IF yes can someone show me an examples??

select dates between 2007-01-01 and 2007-01-09

235 byte By d00_ape at 2007-11-20 10:54:06
I want to list dates with a simple select-statement like this.<br/>2007-01-01<br/>2007-01-02<br/>2007-01-03<br/>2007-01-04<br/>2007-01-05<br/>2007-01-06<br/>2007-01-07<br/>2007-01-08<br/>2007-01-09<br/>Any tip how to do that?

Interesting question on Select - Oracle DB

630 byte By bashish at 2007-11-20 10:54:10
Hi All,I have two tables as belowTable A (id number, data varchar2(100))id data1 1,2,3,42 4,2,7,45 8,5,9,2Table B (id number, name varchar2(100))id name1 xyz2 pqr3 fgrue4 fhueNow what I want, single select statement should return name(s) from table B, if I know id o...

SQL SERVER CE/Mobile

128 byte By yoyosh at 2007-11-20 10:56:56
Could you recommend me a server that would do fine against Pocket2002 and .net framework 1.1 ?<br/> <br/> <br/>Thanks in advance

MS SQL Server 2000/2005 removing logins and roles

3358 byte By ScapinVS at 2007-11-20 10:58:56
Hi there,I try to remove logins and users and finally drop a database using the following script:use master /* database in use cannot be dropped */goif convert(int, convert(char(1), SERVERPROPERTY('ProductVersion'))) > 8 begin select 'SQL Server 2005' IF EXISTS (SELECT * FRO...

ESE - is there any more convenient way to use it?

522 byte By infrared at 2007-11-20 10:59:46
Hello,I'm new with ESE API.I have this attached sample program that I downloaded from somewhere.It seems quite complicated to do even simple things like searching with more than one condition (i.e select * from TABLE where COL1='bla' and COL2 like '123%').Can you direct me t...

Paging and Sorting

1693 byte By maverick786us at 2007-11-20 11:00:15
I am using this procedure to extract records from a tableALTER PROC [dbo].[dbWBS_usp_DisplayCertificatesDetails]( @PageNum BIGINT=1, @PageSize BIGINT=10, @OrderBy VARCHAR(50)='Certificate_Id', @TotalRowsNum BIGINT=0 OUTPUT ) AS BEGIN -- SET NOCOUNT ON added to prevent extra...

SSIS WebServiceTask simple type cast problem

543 byte By trenches at 2007-11-20 11:03:01
I have a SQL task that fetches some data from sql server 2005 which is then fed to a foreach loop to iterate through the recordset and call a webmethod for each record. The method parameters are extracted from fields in the recordset and one of the parameter types happen to be a simple enumeration...

Oracle version information

228 byte By Jokhan at 2007-11-20 11:03:23
Hi,<br/>I want to extract oracle version information installed on my host programmatically ( using c++).<br/>Kindly give me the idea, how can get the Oracle version information on windows.<br/>Regards,<br/>Jokhan

Very advanced query, checking for existing combinations...

1201 byte By bjswift at 2007-11-20 11:04:19
I am trying to write a procedure which returns a simple boolean, 1 if an item exists in our database with the same combination of values as what the user defines from the UI.The tables are structured such as:itemNo, Property, ValueSo you can have a table that looks like this:001, a, 1001, b, 2001, c...

What makes somthing many-to-one relationship?

2148 byte By voidflux at 2007-11-20 11:05:39
Hello everyone.I was confused on what makes a many-to-one relationship. For instance I modeled this .ddl db2 code in Rational Software Architect and its showing its a many to 1 relationship based on the code I'm going to paste.The reason Im' asking this is because I'm writing a progra...

How do I choose either source1 or source2 in mysql

2022 byte By edhan at 2007-11-20 11:06:05
HiI am trying to display either source1 or source2 thumbnail image but unable to find a solution. Hopefully someone will be able to help.Here is the code I am trying to figure out.$db=mysql_connect ($DB_HOST ,$DB_USER,$DB_PASSWORD) or die ('I cannot connect to the database because: ' . mys...

database in my website

75 byte By king_jerald at 2007-11-20 11:06:06
how can i insert a database in my website that where i can add edit delete?

Comparing 2 dates

322 byte By maverick786us at 2007-11-20 11:11:05
I have a table like thisCREATE TABLE tbl_CustMaster(CustID BIGINT IDENTITY(1,1)CustName VARCHAR(100),JoinDate DateTime,EndDate DateTime)Now I want to run a query in which I want to extract custID which lies between JoinDate and EndDate. Can someone help me in doing this??...

Whats happening inside Search Engines

759 byte By amal2004 at 2007-11-20 11:15:09
hii all,Im doing a research about search engines.if any body knows how it works pls reply this thread.I found some details but don't know whether correct.Also i would like to know is there any difference between the mechanism of search engines? ***first it searches the all web pages based on t...

In need of Table Structures

224 byte By rajtelco04 at 2007-11-20 11:15:39
Hello to all gurus, <br/> I am making a software for payroll system in my company. But the time limit is very less. So I am in a hurry. Can anyone please send me links of the table structures of Payroll system<br/>Thank You

MYSQL as a Unix Socket

107 byte By walidaly at 2007-11-20 11:16:01
How do I connect from php to mysql through a Unix socket not going into TCP/IP as they both on same server?

SQL SERVER 2005 & VISTA BUSINESS

893 byte By yoyosh at 2007-11-20 11:16:35
I have Vista Business (64bit) and I tried to install MS SQL SERVER 2005. My computer`s name is HFAST. During installation I have choosen 'Windows Authentication" and LocalSystem login. I`m running Administrator account. Here is my problem: I have installed 2 database engines (one default and on...

SQL 2005 Express Edition - SQL Profiler?

193 byte By THY02K at 2007-11-20 11:17:04
Hi, is there a "SQL Profiler" which comes with SQL 2005 Express Edition ( http://msdn2.microsoft.com/en-us/express/bb410792.aspx) <br/>If not, can I download one separately?<br/>Thanks

deleting top 30 items of the table of each date

169 byte By srinivasgajula at 2007-11-20 11:17:43
i am using sql server 2005 <br/>my table consist information date wise...<br/>now i want to delete top 20 or 30 rows of each date<br/>thanks in advance...

Progress Questions

846 byte By s2welee at 2007-11-20 11:18:18
Hey folks. I am having a terrible time trying to learn some pretty old software (not much info about them around anymore). I am a network Admin (0 db experience) who has been shouldered with DB issues... I have a progress database (v9.1) that I need a bit of help with. My issue is that I am not...

Read a SQL xXpress Created Database

1380 byte By NV2002 at 2007-11-20 11:25:33
Hi All, I am a newbie. I am using SQL SERVER EXPRESS ( Free Version ) and theFree version of VB.net 2005. I have created a Database inside the VB.netIDE and can use it with the program fine. How do I view this same databasewith another program ? I found the Database viewer and I can't seem to g...

DAL vs Web Services

617 byte By terickso at 2007-11-20 11:25:35
My company is considering changing from using webservices to retrieve data from a sql database to a data access layer utilizing business objects. Has anyone actually use both and can comment on performance differences. Also is a dal the definite way to go, not taking into consideration the time to...