Microsoft SQL Server Express Edition

491 byte By miteshpandey at 2007-11-20 9:06:04
Hi,I have many .mdf files generated in Microsoft SQL Server 2000 in another computer.Now I want to view these *.mdf files through the Microsoft SQL Server Express Management Studio. I was unable to Install SQL Server 2000 in my machine because my machine uses Windows XP 2005.Therefore I had to resor...

Deleting Equally?

1009 byte By heffa at 2007-11-20 9:08:17
This was posted in ADO.net as well, Moderators please delete that that thread ( http://www.dev-archive.com/forum/showthread.php?t=428165)Hello,SQL workgroup 2005, I want to delete a bunch of blobs so the DB doesnt outgrow the diskspace. The blobs has various meta-data but I want to delete them based...

select question...

660 byte By DrunkenDisorderly at 2007-11-20 9:08:36
Hi All, Can anyone enlighten me as to what the difference may be between a select... into and a insert select?It may help to know that a temporary table is being created on the select..into statement :select * into #temptablewhere (conditional code here)and immediately after that in the T-SQL scri...

IQ : UNION Problem

881 byte By Raghavendra Prabhu at 2007-11-20 9:10:50
Hi,OS : W2000DB: TimesTen/SYBASE Table1 : 1,2,3,4Table2 : 2,3,5Table3 : 1,2,3,6 Add new row to Table3 which should not exist in Table3 but exist either in Table1 or in Table2if no records exist in Table3 then Table3 will be UNION of Table1 and Table2 i.e (1,2,3,4,5) please anybody suggest me how to...

SQL Statement

1134 byte By massspectrometry at 2007-11-20 9:10:52
Hi there.. Although i know my questions will sound quite stupid, but i've tried n tried n i can't get the desired output.. so here goes...I'm using SQL Server 2000. I have one table call SMSReceived. in that table, there's a lot of columns. But i need to display only 2 column whi...

Concatination

305 byte By maverick786us at 2007-11-20 9:10:53
In SQL Server 2005 how can i concatinate a string with an Integer??for example I have a table named Branch_Details in which there is a field named B_Code which is numeric, and when I use SELECT query I want it to be displayed in B001, B002, B003.........B00n format. How can i accompalish this??...

Adaptive SQL Query

467 byte By Mjdgard at 2007-11-20 9:10:54
I would like to build a search form using different input fields.E.g. : Name, Surname, IDNow, the user does not have to fill in all fields. The empty ones should be neglected. The filled once should be AND-connected for a SQL query.What's the easiest way to do this? Do I really have to check th...

Create trigger on inserting into another database

222 byte By dummyagain at 2007-11-20 9:11:20
I have two databases named as A and B. After insert content in the table of database A, it will trigger a query on insert the same table of database B. I would like to know how to do it with SQL Server?<br/>Thank you.

Update Trigger Howto

501 byte By dummyagain at 2007-11-20 9:12:14
I am just a very beginner on using trigger. I get 2 databases A and B. When there is update on A, a trigger will be made on updating B.here is the trigger i wrote CREATE trigger update_master_add_charge on master_addition_chargefor updateas update B.master_addition_charge set(acm_desc=?, curr_id=?,...

How to create hash clustered index in oracle?

168 byte By Mushq at 2007-11-20 9:16:15
Hi,<br/>How can i create hash clustered index in oracle? <br/>Best Regards,<br/>Mushq<br/>Mushtaque Ahmed Nizamani<br/>Software Engineer <br/>Ultimus Pakistan

return column name with result

273 byte By saipkjai at 2007-11-20 9:16:36
hi<br/> I'm having problem with retriving the column name with the result I got from the stored procedure. Since I was using a variable to save down the result I got, Is there a way to return the column name that the result are from with the actual result I got?

how to create Multi values field

296 byte By pragashan at 2007-11-20 9:17:12
I want to create a table with 5 fields. there is 1 field has multi values. how to write the sql code for that.<br/>for example :<br/>1) Field Name "Gender" It has two values "Male" & "Female"<br/>or<br/>2) Field Name "Group" It has three values "Home", "Office" and "Personal"

Basic table and SQL help . . .

1959 byte By root729 at 2007-11-20 9:17:45
Hi all,I am really new to MySQL and php and need some help understanding the best way to organise some data.The way I have set it up is not working for me, it may be because I have designed the table incorrectly or I do not know the correct way to pull the data back out with sql.So . . The 2 tables...

SQL Stmt fine tune

533 byte By newvisva at 2007-11-20 9:19:22
I have a SQL stmt that someone wrote... I'm trying to make it faster... anybody can share the idea?SELECT *FROM (SELECT ROW_NUMBER() OVER (ORDER BY DateModified DESC)AS Row, * FROM activities where Location LIKE '%abcd%' or Subject LIKE '%abcd%' or Location LIKE ...

C++ Class generation based on XML

586 byte By mcmancsu at 2007-11-20 9:22:12
I want to see what you guys knew about this. I have come across such programs like xmlbeansxx, which will parse out the XML and create C++ classes for a user to implement, but getting it to work is proving troublesome. I have a concern with this method which has to deal with a dynamic XML document...

PostgreSQL JDBC driver acts wired (ERROR: syntax error at or near "$1")

747 byte By Mjdgard at 2007-11-20 9:24:37
I basically use JAVA statements to generate the SQL query as following.statement = con.prepareStatement("UPDATE "User" SET "Name" = ?, "Email" = ?");statement.setString(1, "'foo'");statement.setString(2, "'bar'");statement.executeUpdate();thies yields the error message:org.postgr...

Export Select Query Result to text file

107 byte By dummyagain at 2007-11-20 9:27:39
I would like to know the Oracle Command to export the select query result to text file.<br/>Thank you.

[RESOLVED] MySQL 5 NOW() function.. unexpected..

1012 byte By Ipsens at 2007-11-20 9:28:18
$link = new mysqli(MYSQL_NAME, MYSQL_USER, MYSQL_PASS, MYSQL_DBNAME);if ( mysqli_connect_errno() ) { echo 'Too many users connected to the database!<br />Please try again later.'; }else { $query = "UPDATE time_actions SET proc_start=NOW() WHERE pid=555"; $result = $link-&g...

Select range of rows

587 byte By bsaucer at 2007-11-20 9:28:28
I have a stored procedure with a rather complicated select query. Sometimes this query can return several thousand rows.I want to be able to select a range of rows by number, such as rows numbered 1200 to 1300. I want to pass these two numbers as parameters. Or I could pass the first row number and...

reading xml from the database

363 byte By dummyagain at 2007-11-20 9:31:10
The database has stored the whole xml page in one column of the table. When i print the result of it, it can only show the first several lines of the xml files but not all, i have tried to export the report using spool filename, however, it doesnt help. I would like to know if there are any ways to...

SQL statement

249 byte By gurupot at 2007-11-20 9:32:05
Hi,<br/>I have a table with a date column which has data in this format 2003-01-31 09:03:05.303. I would like to extract the date from this column and format it to 20030131 format. Can anyone help me how to do this. <br/>Thanks,<br/>Pushpa

Insert stalls webpage

1281 byte By Culperat at 2007-11-20 9:34:44
Hello, I'm working with Oracle as my db. I'm using php to create webpages to allow people at my workplace to enter information into the database. There is already a program developed to utilized the ADOdb function to communicate with Oracle. The problem I'm having I know doesn&#...

Different Results from the same query and DB

794 byte By Culperat at 2007-11-20 9:34:45
I am currently having a problem with not just one website's query, but multiple websites' queries producing false results.OraclePHP - ADOdb When I try to do a SELECT query on some pages I'll get more or less results than actually exist in the database. When I use SSH and connect to...

SQL confused on foreign key/references/constraints, newb question.

3677 byte By voidflux at 2007-11-20 9:36:44
Hello everyone, I'm confused on this part of the SQL code of the connects table below: CONSTRAINT `connects_entity_fk1` FOREIGN KEY (`aEndEntityId`) REFERENCES `entity` (`entityId`) ON DELETE CASCADE, CONSTRAINT `connects_entity_fk2` FOREIGN KEY (`zEndEntityId`) REFERENCES `entity` (`entityI...

getting autonumber from record access

445 byte By keithl at 2007-11-20 9:36:57
Hi,I'm using access (jet4) in a cs windows app. I create a record whose only unique field is the autonumber PK.Whats the best way to get the autonumber for the record that has just been written?I could search for a record matching all the fields of the record I had just entered, but it is possi...

Oracle 10g Object Dependencies

1337 byte By buckey at 2007-11-20 9:37:43
I have been charged with the task of refreshing database. I want to pull text for objects from the database, but haveing trouble building a script that will do just that.The db i am refreshing is the development instance and will basically copy the production environment and reapply all the script...

Need download for SQL SERVER Bug #: 1123 (SQL Hotfix)

605 byte By sm_ch at 2007-11-20 9:37:51
Article ID : 923563 Last Review : June 19, 2007 Revision : 1.1 FIX: Error message when you configure an immediate updating transactional replication in SQL Server 2000: "Implicit conversion from datatype 'text' to 'nvarchar' is not allowed"CAUSEThis problem occurs when the synchr...

SQL timeout issue

572 byte By newvisva at 2007-11-20 9:43:46
I'm using SQL express and during my application startup, i do a basic query to the database. (e.g select column1 from table1)This table only has 30 records but the rest of the tables has many. Because my app runs the query to this table first, i get the error. My database size is 2.0 GB (i know...

Link server Problem

1053 byte By Mark_Lee at 2007-11-20 9:43:48
Hi guys, i need your help urgently. I'm developing a new project for budgeting. My problem is, i have not access to the real server (just call it Server A). The company provides another server (just call it Server B) which provides VIEW for the data from the Server A (Server A and Server B is...

IRowsetIndex()::Seek in SQL CE

661 byte By farzanakhf at 2007-11-20 9:44:13
Dear All,I'm developing application in eVC++3.0 and SQL CE2.0.I've developed the application to fetch the data from the mdf file by passing the index field and using the command IRowsetIndex()::Seek.Consider TableExample with Columns A,B,C,D and index Index1 with column A and Index2 with c...

Migration frm ASP to some other

196 byte By nishisinha at 2007-11-20 9:49:32
presently, I have made some modules in ASP and in that I have to handle database also. But now, I want to use something new according to latest Market trend , please sugg me alternative for ASP.

Calling stored procedures from within stored procedures?

535 byte By lhayes00 at 2007-11-20 9:52:40
Hi all,I have a stored procedure which performs a select operation on a table returning a list of results. How can I call and select from a stored procedure from within another stored procedure?A very simple example of the type of thing which I want to achieve:CREATE PROCEDURE dbo.QueryTest Inpu...

Convert to SQL Function! Help!

984 byte By massspectrometry at 2007-11-20 9:52:57
Can u help me transform this code into sql function?/* Append modulus 11 check digit to supplied string of digits. */function GenMOD11( $base_val ){$result = "";$weight = array( 2, 3, 4, 5, 6, 7,2, 3, 4, 5, 6, 7,2, 3, 4, 5, 6, 7,2, 3, 4, 5, 6, 7 );/* For convenience, reverse the string and work left...

Using BCP to Import

591 byte By minckle at 2007-11-20 9:53:28
HiI'm using the BCP facility to import a text file into a database. My problem is, in the table there are 10 fields but my file only contains data for 3 fieldse.gTable - id,forname,surname,dob,gender,mob_numberFile - forname,surname,mob_numberis there a way of only importing into the required f...

Oltp

470 byte By Brad Jones at 2007-11-20 9:53:52
Database Journal began an article series/project on 'Developing a Complete SQL Server OLTP Database ( http://www.databasejournal.com/features/mssql/article.php/3649271)'. They are discussion the topic and project in their forum ( http://forums.databasejournal.com/forumdisplay.php?f=40).Data...

PL/SQL Accessing DBA_TRIGGERS

616 byte By buckey at 2007-11-20 9:55:39
I am trying to get the trigger_body column (long) into a pl sql varible(long) and am getting character string buffer too small. The text of the body of the trigger is approaching 32767 mark or whatever, so i tried varchar2(4000). Still having the same error.My goal is to get the text into the vari...

basic INNER join question

1381 byte By voidflux at 2007-11-20 9:55:46
Hello everyone I'm having issues converting this statement into an inner join statement.The statement I wrote works fine but isn't up to date with standards where they prefer inner joins rather than the method i'm doing it.Here is the orginal code that works:select * FROM ncim.entity...

Unable to fetch Timpstamp datatype using OCI layer

3288 byte By jainr at 2007-11-20 9:56:20
Hi,I am pretty newbie to OCI layer. I was trying to make a connection tooracle, and was trying to fetch timestamp datatype by bindingtimpstamp datatype.This datatype shows different behavior for different sub secondprecisions.For my program(in c++) I was able to fetch data successfully fordirect exe...

Users of a role

393 byte By Mr. Tomaszek at 2007-11-20 9:57:03
Hi All,I want to get list of all users in particular role. It can be done by executingexec sp_helprolemember 'myRole'Alas it works only when user that executes that is a member of myRole.How to achieve the same (list of all users in particular role) while user that executes that is not in...

Unknown column, any ideas? syntax error.

2402 byte By voidflux at 2007-11-20 9:58:54
Hello everyone! having alittle issues here...mysql> SELECT -> ncim.entity.entityId, ncim.entity.mainNodeEntityId, -> ncim.entity.entityName, ncim.entity.domainMgrId, -> ncim.entity.entityType, ncim.entity.displayLabel, -> ncim.entity.alias, -> ospfService.routerId,...

Is this an impossible SQL query?

1153 byte By sford at 2007-11-20 10:00:22
My Data set looks something like this...Name | StartDate | EndDate | Role------------John | 2007/07/01 | 2007/07/09 | 1Mary | 2007/07/01 | 2007/07/09 | 1Mark | 2007/07/01 | 2007/07/09 | 1John | 2007/07/09 | 2007/07/31 | 2Notice that John appears in the dataset twice, but with different role...

Character Arrays

968 byte By maverick786us at 2007-11-20 10:00:44
I am using SQL Server 2005 Express Edition.I got a table named tbl_UserLogin with following fieldsCREATE TABLE tbl_UserLogin( UserName VARCHAR(10), Password VARCHAR(10), UserType int, FName VARCHAR(20), LName VARCHAR(20), Desg VARCHAR(20))Now in this table if you take a look UserTy...

Using a Variable for varchar size?

563 byte By High_D at 2007-11-20 10:01:24
I want to get the length of a text field then CAST to varchar using that smallint size...however I keep getting errors on the line.Can this be done, or am I doing it wrong?PROCEDURE CreateMailQueue @MailTo textDECLARE @iSize smallintSET @iSize = datalength(@MailTo) + 1INSERT INTO MailQueue WITH (ROW...

MySQL PK error...

969 byte By heroine at 2007-11-20 10:01:41
Hi All,I have successfully parsed the dmoz dump files into mysql.There are 4 tables: structure, content_description, content_links and datatypes.Structure table has fields: catid, name, title....I set the primary key as CATID and it works fine.When I tried to do the same for the rest of the tables...

Invalid Column Problem

578 byte By jsiii at 2007-11-20 10:02:53
Hello... Let's say, I have a table with fields: Name, Born, Died and I want to select all people who were older than 100 when they died.But I cannot specify this condition in the WHERE clause like this:SELECT * FROM table WHERE Died - Born > 100Instead I need to use a special column like thi...

how to get this done in Oracle andMySQL

646 byte By ninhovid at 2007-11-20 10:03:07
hi...i need to do some queries in oracle and mysql but i cant find how to get this done...on SQL server i can do this:SELECT * FROM TABLE WHERE firstname + lastname like '%john smith%'but when i do it in oracle and mysql i cant get it to work...how can i concatenate fields in those databas...

Date and Time

200 byte By maverick786us at 2007-11-20 10:04:17
Usually in SQL Server 2005 we use GetDate to get the current date and time. But suppose I want to store current date and current time individually in 2 different fields. How will I split them into 2??

SQL Server prevent Table Spool

1017 byte By Ranthalion at 2007-11-20 10:05:50
Hi,I have a query that inserts records from one table into another table on a linked server. The problem is that it takes close to 30 seconds to perform the query. If I just insert the records into a table on the same server instead, the query completes almost instantly. I am fairly certain that...

Server.URLEncode equivalent in SQL

169 byte By yaron-b at 2007-11-20 10:06:19
Hello!<br/>Is there a way to encode results of type nvarchar with a function or stored procedure, much like the function in ASP - Server.URLEncode?<br/>Thanks!

MS Access Encoding

625 byte By zeid at 2007-11-20 10:09:28
Hi all, I have used "Downloaded" a software "web spider" that crawl a given URL and saves its info such as "title, describtion, keywords" etc in an Access database, I have a problem with "Arabic" sites that contains Arabic characters in title,desc,body.It is showing it as: ???? - ???????? ??????? ??...