Is it possible to join the results of 2 sql SELECT statements in one statement? I have a database of tasks where each record is a separate task, with deadlines (and a PALT, which is just an INT of days from start to deadline. Age is also an INT number of days.) I want to have a table which has
Tag: sql
file conversion- .mwb to .sql file
I have a database in .mwb format. I want to use it in eclipse so i need to convert it into .sql format. If anyone know how to do that by using any tool. I think My sql workbench can do that, but don’t know how to do that. Answer In the menu click “Database” and then “Forward engineerin…
Determine ROW that caused “unexpected end of file” error in BULK INSERT?
i am doing a bulk insert: DECLARE @row_terminator CHAR; SET @row_terminator = CHAR(10); — or char(10) DECLARE @stmt NVARCHAR(2000); SET @stmt = ‘ BULK INSERT accn_errors FROM ”F:FullUnzipped…
In a currency exchange rate what is the maximum number of decimal places used?
I need to store currency exchange rate data in the SQL 2008 database. I would like to keep rate as a decimal data type in the database. One thing I am not sure about, is how many decimal places to give (e.g. decimal(18, ?)). Since, I will be using this service as a source: http://openexchangerates.org/latest.…
How to use regular expression in T-SQL?
For example: where strword match with {%{J{GC * GC}J} or strword={%{J{GC * GC}J}
How to insert an existing GUID into Oracle RAW(16) field in a script
I have an sql server script which inserts known fixed guid values into a table. It looks like: Note that guid is in human-readable form. Since ID is uniqueidentifier sql server understands how to convert a string to guid data type. I need to make the same script for Oracle, ID is of RAW(16) type. Taking the s…
SQL – Blank default namespaces
I have a relation which has an XML column storing data in the following structure 04-12-2012 &…
Database Design – Loaner System – Customer loaning multiple items
I am implementing a loaner system and would like find out the most efficient / database standard structure technique to use for the loan records. Let me start with the basics: I have two tables: Customer_Record(id, f_name, l_name, p_number) Loaner_Pool(id, model, serial_n, status) The idea is that the loaner …
How do I update multiple columns with a subquery in a single statement?
I am attempting to update a temp table from a source table: Unfortunately it complains Answer After much trial and error I pooled some help at work and we came up with this: Which sybase seems to accept.
Optimize a SQL query : call a function or do a join?
What is the fastest in an ORACLE database ? Call a function inside a select statement to retrive a single value for each row SELECT field1, field2, F_GET_LIBELLE_STATUT( field2 ) FROM table1 WHERE …..