sql

how to make a db schema such that its use is supported by all db management systems

is there a windows xp utility to make a database such that its support by sql server, oracle, and other db management systems. the database schema is very huge so i would like to know what to use to make it so its protable from sql server to oracle if future demands that change? ...

Optimize SQL statement for android sqlite

I'm developing an application that tracks the user's current position and stores it into a SQLite database. Everything works fine, but now I have the problem when querying the database for a track with more than 1000 records it takes nearly 1.5 minutes. On my Desktop it just takes 1 second. I know it's a query with many subselects but I...

VBscript to display all values in a column separated by a comma?

I want to display all email addresses from a column (named email) separated by a comma in html. How would I write a sql query in an html page? ...

Get list of dependent Tables, SQL Server 2005

lets say I have table1 = 'foo' and 4 other tables fee1, fee2, fee3, fee4 now say the primary key of foo is a foreign key of fee1 and fee2. Given the name 'foo' how will I get to know that fee1 and fee2 has foriegn key dependencies on foo. Please help, a psuedo query would be helpful. However, I know how to figure out given the name f...

Query for values from 2 tables where one falls in a range calculated from values in one table.

I have 2 tables. The first one has the columns name, value and offset. The second one has the columns result and calculation. I want to know if there is a way to write a query in access where I would select name, value, result and calculation on the criteria the selected result would be between the selected value+(offset/2000) and value-...

word 2007: adding form fields

does anyone know how to add a TEXTBOX onto a word 2007 document. i need to gather user input and after the form is filled out, the data will be added into an access database thank you! ...

Building Query from Multi-Selection Criteria

Hi All, I am wondering how others would handle a scenario like such: Say I have multiple choices for a user to choose from. Like, Color, Size, Make, Model, etc. What is the best solution or practice for handling the build of your query for this scneario? so if they select 6 of the 8 possible colors, 4 of the possible 7 makes, and ...

Complex SQL query :: display data inline from multiply tables

Hi i have a proble in finding solution. I have 3 tables: Customer customer_id customer_name Relation subscription_id customer_id Subscriptions One customer can have relation with many subscriptions and i want to display data like so: customer_id, customer_name, subscription_first, subscription_second, subscription_n ...all i...

ADODB connection to ACCDB file?

i have a file like this: strPath = "S:\HR\Forms\forms_database.accdb" i am connecting to it through an WORD adodb.connection should my database be a different extension ? MDB or something? i am getting this error when it tries to connect: unrecognized database format 's:...............accdb' what's going on here? here's the enti...

View MDX query generated while browsing a cube

In Sql Server Management Studio once I browse a cube I can drop column fields, row fields and filter fields. This displays the required data. I want to know if there is a way to view the MDX query being generated behind the scenes to display the data? Thanks. ...

accdb vs mdb access database file

what is the difference between these two extensions? i need to write to an access database from a WORD file using an ADODB connection when i create a new access database it gives me the option to make only an ACCDB file and for some reason i cannot make an MDB file can someone please help me create an MDB file so that i am able to ma...

PHP SQL Pagination Problem

I can't seem to get the desired result. SELECT * FROM `messages` WHERE `msgType` = '0' AND `status` = '0' ORDER BY `dateSent` DESC LIMIT 20, 0 Basically I'm trying to show 20 results per page. But this query returns nothing. (For the record, all instances in the db have msgType and status as 0 EDIT: Removing the L...

Audit the target of a SQL Server login

I've recently inherited a SQL server (2008, not R2) where some users connect to the server using the computer name and some users connect using a DNS alias. There is only the default instance on this server. Is there any way I can log or audit the connection string or target of the connection to see whether a user is connecting using the...

anyone have examples of sophisticated WORD 2007 forms that posts to access DB?

anyone have examples of sophisticated WORD 2007 forms that posts to access DB using ADODB connection? ...

How to find all table references from Oracle 10G PL/SQL functions and procedures?

How to find all table references from Oracle 10G PL/SQL functions and procedures? I definitely can execute the following SQL statement: select * from dba_source where text like '%tbl_c%' but I wonder how to find all functions that call functions that refer to table used. For example I can have a function A that calls function B that...

how do i suppress: "do you want to insert this record" on SUBMIT?

i am filling out a form on a word document which posts to access database,. does anyone know if there a way to suppress the message "do you want to insert this record"??? raj mentioned that this is possible to do manually, uncheck ACTION QUERIES, but can i do this programmatically/???? ...

Struggling with a MySQL database of phone numbers

My application wants to store a list of international phone number in a mysql database. Then the application would need to query the database and search for a specific number. Sounds simple but it's actually a huge problem. Because users can search for that number in a different format we'll have to do a full scan to the database each ...

DB Sorting Challenge

I have a table as follows, A A B B1 A A1 B B A A2 B B3 A A3 B B2 My result set should be, A A A A1 A A2 A A3 B B B B1 B B2 B B3 Note: A, A1 are all GUIDs. I have tried quite a few tricks. Please help me solve this problem. ...

SQL: how to check for a specific DateTime

i need to check for a specific DateTime value in my table from my code (VB.NET) and i don't know how to format the DateTime as a string. i've read that SQL Server will recognize my string if it's in either date, time, or date and time format. i mean: 'May 15, 2004' '5/15/2004' '20040515' '2004 4 am' will SQL Server recognize these str...

SQL query shorthand for not selecting null columns when doing select all

Hi guys, when I do: SELECT * FROM SOMETABLE I get all the columns from SOMETABLE, but I DON'T want the columns which are NULL (for all records). How do I do this? Reason: this table has 20 columns, 10 of these are set but 10 of them are null for certain queries. And it is time consuming to type the columnnames.... Thanks, Voodoo ...