Hi ,
I am fetching data from two tables CARRIER_IFTA ,IFTA_NAME.
My Select Query is like below..
SELECT t1.IFTA_LICENSE_NUMBER,t1.IFTA_BASE_STATE,t2.NAME_TYPE,t2.NAME
from CARRIER_IFTA t1 inner join IFTA_NAME t2
on t1.IFTA_LICENSE_NUMBER=t2.IFTA_LICENSE_NUMBER
My Data is coming in this way...
IFTA_LICENSE_NUMBER IFTA_BASE_ST...
I need to find differences between 2 identically structured sql tables
Each table is being uploaded from a 3rd paty tool into sqlserver database.
The table structure is:
Issue ID-status-Who
Issue ID will not repeated within a table, though its not defined explicitly as primary Key
There could be additions/deletions/Updations betwee...
I have a DataReader and a StringBuilder (C#.NET) used in the following way;
while (reader.Read())
{
sb.AppendFormat("{0},{1},{2},",reader["Col1"], reader["Col2"], reader["Col3"]);
}
Which works great for my use, but when a row is null I need it to return "null", inste...
I'm working on an MS Access Database with tons of duplicate entries. The problem is that there is a table of students, and sometimes instead of just updating a certain student's information, someone would just add the student in again with a different ID. I want to get rid of all the duplicates (which is a pain since there's barely any w...
Hello,
SQL is not one of my strong suits. I have a SQL Server 2008 database. This database has a stored procedure that takes in eight int parameters. For the sake of keeping this question focused, I will use one of these parameters for reference:
@isActive int
Each of these int parameters will be -1, 0, or 1. -1 means "Unknown" or "D...
I'm currently using ODBC to connect to my MySQL database, using C#. I've been told that using the MySql Connector would be better, and faster, and not dependent on Windows. Can someone shed some light on this please? I've been unable to find anything on the net so far
...
DECLARE @STR_IDS VARCHAR(15)
SET @STR_IDS='7,15,18'
UPDATE TBL_USERS WHERE ID IN @STR_IDS
I know the update statement would not work as the ID is of type INT and i am replacing a varachar value there .How can i change the query so that it will be executed like this in effect ?
UPDATE TBL_USERS WHERE ID IN (7,15,18)
Thanks in advac...
Hi all,
I began recently a new job, a very interesting project (C#,.Net 4, Linq, VS 2010 and SQL Server). And immediately I got a very exciting challenge: I must implement either a new tool or integrate the logic when program start, or whatever, but what must happen is the following: the customers have previous application and database ...
I thought "after delete" meant that the trigger is not fired until after the delete has already taken place, but here is my situation...
I made 3, nearly identical SQL CLR after delete triggers in C#, which worked beautifully for about a month. Suddenly, one of the three stopped working while an automated delete tool was run on it.
By ...
My IIS 7 server uses a C#.NET codefile to read from an MS SQL database (on another machine) and presents it on the web. I made a similar posting before, but the problem has resurfaced and I've not been able to fix it.
In this regard I've had a problem with my Norwegian Windows Server running IIS 7. It reads the columns from a database w...
I am running ActiveState's ActivePython 2.6.5.12 and PostgreSQL 9.0 Beta 1 under Windows XP.
If I create a table with an upper case first letter (i.e. Books), psycopg2 returns the "Programming Error: relation "books" does not exist" error message when I run the select statement: execute("SELECT * FROM Books"). The same error is returned...
There are several questions on SO about version control for SQL and lots of resources on the web, but I can't find something that quite covers what I'm trying to do.
First off, I'm talking about a methodology here. I'm familiar with the various source control applications out there and I'm familiar with tools like Red Gate's SQL Compare...
I have a weird situation, where simple queries seem to never finish
for instance
SELECT top 100 ArticleID FROM Article WHERE ProductGroupID=379114
returns immediately
SELECT top 1000 ArticleID FROM Article WHERE ProductGroupID=379114
never returns
SELECT ArticleID FROM Article WHERE ProductGroupID=379114
never returns
SELEC...
Hi,
I'm trying to log hibernate activity (only dml operations) to an sql script file.
My goal is to have a way to reconstruct the database from a given starting point to the current state by executing the generated script.
I can get the sql queries from log4j logs but they have more information than the raw sql queries and i would need...
I have some extremely complex queries that I need to use to generate a report in my application. I'm using symfony as my framework and doctrine as my ORM.
My question is this:
What is the best way to pass in highly-complex sql queries directly to Doctrine without converting them to the Doctrine Query Language? I've been reading about ...
I'm trying to figure out the best way to make a file folder system in sql.
I'm making a website that will be using similar system as explorer in windows.
You open your c: drive and you see there some folders and files, and you open one folder and you see more files and folders there.
So what i'm asking, would i use one table for this a...
This is a very open question, but I think it can be very beneficial for SQL readability.
So you have a Java program, and you are trying to call a monster SQL statement from it, with many subqueries and joins. The starting point for my question is a string constant like this:
static string MONSTER_STATEMENT =
"SELECT " +
" fiel...
I'm looking for a simple DB2 query that can be used to test if a database connection in pool is still valid. It needs to be a generic query that would execute regardless of which databases exist.
For other database servers, I've used something like 'SELECT 1' or 'SELECT version();'
What would be an equivalent for DB2?
Thanks!
...
I'm creating a members site, and I'm currently working on the user Preference settings. Should I create a table with all the preference fields (about 17 fields) or should I include them in the main member table along with the account settings?
Is there a limit as to how many fields I should have in a table? currently the member table ha...
I have a data processing system that generates very large reports on the data it processes. By "large" I mean that a "small" execution of this system produces about 30 MB of reporting data when dumped into a CSV file and a large dataset is about 130-150 MB (I'm sure someone out there has a bigger idea of "large" but that's not the point....