How to save a table (with its rows, columns and cells) in one single field in a SQL database
How to save a table (with its rows, columns and cells) in one single field in a SQL database and then display it on a webpage ...
How to save a table (with its rows, columns and cells) in one single field in a SQL database and then display it on a webpage ...
Hello, I have the following 3 tables Table1 ID | NAME ----------- 1 | X 2 | Y 3 | Z Table2 ID | NAME ----------- 1 | A 2 | B 3 | C Table3 ID | P (Boolean field) | Other cols 1 | True ... 2 | True.... 1 | False now I need a query on table3 that has to do the following. to display the name field of table1 and table2....
I'm dealing with a website where people can subscribe to certain things for virtual money. I need to put the dates at which subscriptions end in the database. My table has a field "expiration" for that, which is a DATE. When the user extends his subscription, I need to add 1 month to this date. However, if the subscription has already e...
What is the meaning of Log Sequence Number? I know that it is of type binary and 10bytes long and it corresponds to the time the transaction happen in DB. But is this a high precision date-time value that is stored in some efficient binary format or is this a function of date-time and something else (for example the serial number of tran...
Here in this video at 11th minute, while explaining about strange structure (compared to SQL) of LINQ query, Anders Hejlsberg says that "Scope of variables in SQL flows backward in SQL", What does he mean by that? I'm totally confused... :( ...
What is the underlying datastructure of datetime values stored in SQL Server (2000 and 2005 if different)? Ie down to the byte representation? Presumably the default representation you get when you select a datetime column is a culture specific value / subject to change. That is, some underlying structure that we don't see is getting ...
I have a table created with: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[TestFeature1]( [Id] [nvarchar](50) NOT NULL, [Leng] [decimal](18, 0) NOT NULL ) ON [PRIMARY] GO SET ANSI_PADDING OFF I inserted data with this: insert into TestFeature1 (id,leng) values ('1',100); insert into Test...
I want to read the content from an external page, convert that into a predefined format, and then enter it into a database. This is just for fun--it's taking an event list and copying the events to my own site. Take this page, and manipulate it to fit a different format... Is it possible to do this with jquery? ...
Hi, I want to join results of two different store procedures that returns same structure in following fashion: EXEC StoreProcedure1 p1 UNION EXEC StoreProcedure2 p2 I realize that is not possible, can sombody suggest elegant alternative? I beleive I should use temp table ? Thanks ...
I have a set of stock data records. I also have a set of dates for which, even though I might have data, I cannot trade stocks. Here's the sample DDL for the setup: create table #stock_data ( symbol varchar (10) NOT NULL, asof datetime NOT NULL, price float NOT NULL ) go insert into #stock_data values ('IBM', '7/1/09', 100) ...
Could someone please help me with this? I need to convert an nchar column to an nvarchar column and trim the whitespace. Thank you. ...
I'm fairly new to asp.net and especially LINQ and SQL. Say I have a table "Employees" with fields "Lastname", "Firstname", and "ID". I want to bind this to a list box. I want the list box to display it's contents like "$LASTNAME, $FIRSTNAME" and I want the value of each item to be "ID". It's trivial to bind either name column to the l...
I need to create a simple search but I can't afford to use Sphinx. Here's what I wrote: keywords = input.split(/\s+/) queries = [] keywords.each do |keyword| queries << sanitize_sql_for_conditions( "(classifications.species LIKE '%#{keyword}%' OR classifications.family LIKE '%#{keyword}%' OR ...
In Oracle SQL Developer, if I'm viewing the information on a table, I can view the constraints, which let me see the foreign keys (and thus which tables are referenced by this table), and I can view the dependencies to see what packages and such reference the table. But I'm not sure how to find which tables reference the table. For exam...
Inside of a stored procedure, I populate a table of items (#Items). Just basic information about them. However for each item, I need to make sure I can sell them, and in order to do that I need to perform a whole lot of validation. In order to keep the stored procedure somewhat maintainable, I moved the logic into another stored procedur...
I'm trying to sum two columns, and subtract the two sums to get a balance amount of two columns. But I'm getting the same output for both queries even though I know there are negative values. I need to exclude those negative values in the query. SELECT SUM(ReceiptAmt) - SUM(BalanceAmt) FROM Receipt SELECT SUM(ReceiptAmt) - SUM(BalanceA...
How can I select data in the same query from two different databases that are on two different servers in SQL Server? ...
For a user logging table I have in a SQL database, I track the some of the parameters off of a report request. The report allows multiple ID's to be passed to it and I store all of those in a single column in the database column. If this were to be a normalized set of data, there would definitely be an additional table setup for this, ...
Hi, I have a table that has a title column. I want to search for whole words like foo. so match " hi foo bye" o "foo", but not "foobar" or "hellofoo". Is there a way without changing the table structure to do this? I currently use 3 like queries, but it is too slow, I have " select * from articles where title like '% foo' or title...
I have a tree in my database that is stored using parent id links. A sample of what I have for data in the table is: id | name | parent id ---+-------------+----------- 0 | root | NULL 1 | Node 1 | 0 2 | Node 2 | 0 3 | Node 1.1 | 1 4 | Node 1.1.1| 3 5 | Node 1.1.2| 3 Now I would like to get a list o...