sql

SQL Management Object, Continue On Error yet log message

I'm currently using SMO to help automate the patching and/or upgrading of customer databases that are in production. I'm using the following code Public Sub RunScript(ByVal db As Database, ByVal scriptInfo As FileInfo) If scriptInfo.Exists Then RaiseEvent LogMessage("Executing Indicated Script: " & scriptInfo.Name) ...

Disabling "Unicode Compression" property by SQL Query ( Access )

Is it possible to have a SQL statement in Microsoft Access that can disable the unicode compression property on a column ? Something in the lines of : ALTER TABLE MyTable ALTER COLUMN MyColumn DISABLE UNICODE COMPRESSION ...

tsql query and index question

I have a table that stores photo information with id as Primary key: id(PK), title, album_id, posted_by, published, filename, tags, ratings, date_posted This table will hold infor of 100+ Million photos and I need to run this query like these frequently: 1) get all photos (just id,filename,title columns) of a given album s...

Incorrect syntax error when accessing remote stored procedure

Hello again, StackOverflow - I'm still trying to deploy this site, but with every problem I solve, another arises. Anyways - I've set up the database at my hosting to allow remote connections, and it is running Sql Server 2005. On my development machine, I am working with Sql Server 2008. I've installed the asp.net schema on my hosted ...

Use cid in sqlite instead of column name?

When creating a view, the name assigned to a column is not always usable in sqlite, in order to perform a specific operation afterwards. For instance, I created the following view: CREATE VIEW myview AS SELECT amount, count(name), name FROM mytable GROUP BY name HAVING count(name) > 1; Then I would like to do the following...

Access: Get list of all columns in DB that have "unicode compression"

In Microsoft Access , is it possible somehow to get a list (via a SQL query ) of all columns that have UNICODE compression enabled ? Maybe by executing a query on some Microsoft Access system table ? Any ideas ? ...

up table set number2 = number where number != "" and set number, number2 = $number where number = "";;

Hi there, is this possible? update table set number2 = number where number != "" and set number, number2 = $number where number=""; or do i need to do update table set number2 = number where number != ""; update table set number = $number, number2 = number where number = ""; ...

HSQLDB: Duplicate column name, unsupported internal operation: Type, invalid character for cast

I am beginning with HSQLDB, but I hit this issue and can't figure out what's going on: CREATE TEXT TABLE ozizkaindata ( jobName VARCHAR(255) NOT NULL, buildNumber VARCHAR(255) NOT NULL, config VARCHAR(255) NOT NULL, ar VARCHAR(255) NOT NULL, arFile VARCHAR(255) NOT NULL, deployDur VARCHAR(255) NOT NULL, warmupDur VARCHAR(2...

Is there an alternative to joins to increase performance?

Is there an alternative to joins to increase performance? Edit (gbn): related to join-or-correlated-subquery-with-exists-clause-which-one-is-better Why didn't anyone mention about nested loop joins? ...

Doctrine partial objects ... isit for performance?

i learnt that in doctrine i can return partial objects. when i just do print_r() of the result set returned, they seem to still contain the definations for the fields, except that when i echo them out i get nth. so i guess the definations are there but the values are not. is this for performance? eg. in SQL i shld do SELECT field1, field...

MySQL Query GroupingSubQuery Question

Hello, I am having trouble getting my head around this query for some reason and I was wondering if someone would be able to help me out here. I have the following 3 tables: opp_cstm: id_c make_c time_followup_c lead_category_c lead_type_c 9 GMC 224 GM Internet Sales e Buick 8...

Update Table with auto incrementing dates in date column

hi, I want to update a Table with auto incrementing dates in date column in Sql server 2005. ...

Is there an elegant way to Invert a Bit value in an SQL insert Statement?

I'm converting some data in SQL Server: INSERT INTO MYTABLE (AllowEdit) (Select PreventEdit from SOURCETABLE) so I need to inverse the bit value from source table. I expected NOT to work, as this is how I would do it in code, but it doesn't. The most elegant way I can think of is: INSERT INTO MYTABLE (AllowEdit) (Select ABS(PreventEd...

I don't understand Collation? (Mysql, RDBMS, Character sets)

I Understand Character sets but I don't understand Collation. I know you get a default collation with every Character set in Mysql or any RDBMS but I still don't get it! Can someone please explain in layman terms? Thank you in advance ;-) ...

What is the best solution to retrieve large recordsets - more than 3000 rows

I have a SQL Server table with 3000 rows in it. When I retrieve those rows it is taking time using a Select Statement. What is the best solution to retrieve them? ...

Run normal SQL using Doctrine 2

i know i can run DQL and all the fancy ORM features using Doctrine. but for development, maybe i want to just initialize the database with defalt data. say i want to do: truncate the database tables initialize tables with default test data i am thinking it will be good if i can just go to a page say /initData that truncates databas...

problem using aggregate functions with multipul table joins

My goal is to make an aggregate function (sum) and group the elements , but there is an error this is all the steps that i have done 1- first step code SELECT ca.question_id , ca.choice_0 ,ca.choice_1 ,ca.choice_2 ,ca.choice_3 ,ca.choice_4 ,q.headline_id FROM closed_answers ca INNER JOIN questions q ON ca.question_id...

wamp with php5.3.3 ?

http://www.php.net/archive/2010.php#id2010-07-22-2 i want to test it on windows but it seems there isnt a fast wamp server that fits 5.3.3 are there any today ? thanks ...

Elixir/SQLAlchemy equivalent to SQL "LIKE" statement?

I'm using the MySQLicious type schema described here for a simple tagging system. I've read some alternative implementations of tagging schema in 4 different SO threads, and this suits my needs best. A collection of entries have the tags "apple banana orange" and "strawberry banana lemon", and I'm trying to find the Elixir/SQLAlchemy eq...

SQLite Query: How to find out the Average of last X records for every person

Let's say I have two SQLite tables: Table Players id|name Table Scores id|player_id|score|timestamp What would an SQLite query looks like, if I want to calculate the average scores for every players, but only from 5 of their latest scores. I've a working query that only works to calculate the average from all scores (using GROUP BY ...