Wednesday, March 28, 2012
Multi Record Insert
This works:
INSERT INTO test (valueField) VALUES (1);
This does NOT:
INSERT INTO test (valueField) VALUES (1),(2),(3);
Why and how do i make it work? i want to insert multiple records with one
insert statement.. if i insert each one seperately then it takes too long..
i guess i could use transaction locking... but isn't there an easy (aNSI
compatible) way of inserting many records quickly with as few statements as
possible?
I am trying to compare MySQL 4.1 and 5 to SQL Server 2005 and i would most
like to have SQL statements that work in both.
Thanks for any help!
Ok i am have to create a program that per SQL over ODBC is compatible with
different DBMS's. Qurrently i have a proUse INSERT...SELECT:
insert <table>
(
<column>
)
select <column>
union all
select <column>
union all
select <column>
..
ML
http://milambda.blogspot.com/
Monday, March 26, 2012
multi columns in detail section
so instead of
1. alam Dept1 10000
2. khaiser dept2 20000
3. mujeeb dept2 20000
I would have
alam khaiser mujeeb ...
dept1 dept2 dept2 ...
10000 20000 20000 ...I have three fields in my report that make up each record. I would like to display these in detail section.
so instead of
1. alam Dept1 10000
2. khaiser dept2 20000
3. mujeeb dept2 20000
I would have
alam khaiser mujeeb ...
dept1 dept2 dept2 ...
10000 20000 20000 ..|||I have three fields in my report that make up each record. I would like to display these in detail section.
so instead of
1. alam Dept1 10000
2. khaiser dept2 20000
3. mujeeb dept2 20000
I would have
alam khaiser mujeeb ...
dept1 dept2 dept2 ...
10000 20000 20000 ..
i'm in urgent need of the solution. my project is at termination . i need some help on the above said details . i will be thankfull for it .|||'m in urgent need of the solution. my project is at termination . i need some help on the above said details . i will be thankfull for it .|||Use Cross tab Report
What database are you using?
Friday, March 9, 2012
mssql7 to mssql200 transfer tables
100000 records out of it and place them into the new machine with
mssql2000. The new machine will also have the same table name, so I
want to append the 100000 records into that table.
Thanks,
Royal344
--
Direct access to this group with http://web2news.com
http://web2news.com/?comp.databases.ms-sqlserverroyal344 (royal344.news.invalid@.web2news.net) writes:
> I have a table in mssql7 that has 7000000 record and I want to take
> 100000 records out of it and place them into the new machine with
> mssql2000. The new machine will also have the same table name, so I
> want to append the 100000 records into that table.
Do you want any 100000 rows?
You could use BCP and make use of the options for specifying first and
last row. I don't recall the exact name for these options right, but
you can look up the syntax for BCP in Books Online.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp