hey
i got a problem once again :D
a little info first:
im trying to copy data from one table to an other table(structure is the same).
now one cell needs to be incremented, beginns per group at 1 (just like a histroy).
i have this table:
create table My_Test/My_Test2 (
my_Id Number(8,0),
my_Num Number(6,0),
my_Data Varchar2(100));
(...
Consider a DB with a Client table and a Book table:
Client: person_id
Book: book_id
Client_Books: person_id,book_id
How would you find all the Person ids which have no books?
(without doing an outer join and looking for nulls)
...
Hi, my table is look like this order.. I would like count the TermID's with these conditions; If it's possible also want to get resultset with these headers
- TermID must have close or open status
- TermID Status must turn to Open (close to open)
- Status Date (open status) must be bigger date than close status date
with my regards,
...
What is the difference between tinyint, mediumint, bingint and int in sql?
In which case are used?
...
i would like all data that is entered into a specific column to always have a trailing comma and also i need the first character to always be a comma. how do i do this? the best solution is probably not in vba or sql but probably the properties of the table?
...
Similar to Insert into a temp table from a stored procedure on Sql Server 2000 from last year, but now with a strange error.
I'm using Microsoft SQL Server 2000 to dump results from one stored procedure into the temp table of another procedure. Both procedures are on the same physical server, yet I'm getting an error message as if the s...
Hi all I was just curious if I could do something like -
insert into Employee ( Select * from Employee where EmployeeId=1)
I just felt the need to do this a lot of times...so just was curious if there was any way to achieve it..
...
I want to get the difference of two values within a time frame.
so I have a table like this
Data Table
TimeStamp DataValue
2010-06-01 21
2010-06-03 33
2010-06-05 44
So I want to first get all data over the last month which I can do with something like.
([TimeStamp] < GETDATE()-0 and ([TimeStamp] > GETDAT...
how to enter manual time stamp in get date () ?
select conver(varchar(10),getdate(),120)
returns 2010-06-07
now i want to enter my own time stamp in this like
2010-06-07 10.00.00.000
i m using this in
select * from sample table where time_stamp ='2010-06-07 10.00.00.000'
since i m trying to automate this query i need the curre...
i am using Docmd.TransferText to import data from a text file into my access table.
i would like it to do the following:
if the record already exists, then update it
if the record does not exist then add it
how do i accomplish this?
currently i have this line:
DoCmd.TransferText acImportDelim, yesyes, "table3", "C:\requisition_dat...
i am exploring the option of whether DoCmd.TransferText will do what i need, and it seems like it wont. i need to insert data if it does not exist and update it if it does exist
i am planning to read a text file line by line like this:
Dim intFile As Integer
Dim strLine As String
intFile = FreeFile()
Open myFile For Input As #intFile
...
Getting the results sets via OpenQuery when the underlying proc creates/deletes or inserts into a table is acting funny:
Sample proc:
create procedure test_VanishingTables
as
create table zTableThatVanishes
(
Value1 int,
Value2 varchar(255)
)
IF not exists (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[zTa...
i am inserting values into a table
if the record exists already replace it, and if it does not exist then add a new one.
so far i have this code:
INSERT INTO table_name
VALUES (value1, value2, value3,...) where pk="some_id";
but i need something like this
if not pk="some_id" exists then INSERT INTO table_name
VALUES (value1, v...
I have a fairly simple MS Access Database that contains some metadata about a bunch of documents and a hyperlink field that links to the document on our network drive.
However, when I use a SQL INSERT statement to populate the hyperlink field, the value I give it only becomes the display text, not the actual link.
How can I make the va...
i have 2 tables in access
this is what i need:
1. if the PK from table1 exists in table2, then delete the entire record with that PK from table2 and add the entire record from table1 into table2
2. if the PK does not exist then add the record
i need help with both the sql statement and the VBA
i guess the VBA should be a loop, going...
Hey all,
I was wondering if anyone had any experience with what I am about to embark on. I have several csv files which are all around a GB or so in size and I need to load them into a an oracle database. While most of my work after loading will be read-only I will need to load updates from time to time. Basically I just need a good ...
I have a table [Tbl1] containing two fields.
ID as int And
TextValue as nvarchar(max)
Suppose there are 7 records. I need a resultset that has two columns Text1 and Text2.
The Text1 should have first 4 records and Text2 should have remaining 3 records.
[Tbl1]
ID | TextValue
1. | Apple
2. | Mango
3. | Or...
i would like to use this syntax to update a table in access based on data from a txtfile.
fenton in his comments on this answer:
http://stackoverflow.com/questions/2992168/read-text-file-line-by-line-and-insert-update-values-in-table/2992337#2992337
said that this is possible and i would like to see the exact syntax please
...
Im using entity framework for a project and wishes it to behave in similiar way as my normal ado.net-project, where I never fetch the password hash from the database to avoid security leaks of secret information.
I´ve though of a couple of ideas
one is to hide the field from partial
class but I don't know if that is
possible.
Change ...
I hoping someone may be able to point me in the right direction for this...
Basically Im writing an asp.net web control to dynamically display a set of data based on field data stored in the database.
I want the control to create a dynamic asp table from a set of data from the database, however I cant get my head round the query needed...