Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View PHP questions
View Python questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by TenmanS14 (Top 14 by date)
by the look of that you just need to be creating 3 tables to import into,
applicant which will hold applicantid and other stuff if you have it
school which will hold schoolid and name and other stuff
and a 3rd table to join them which will hold applicantid and schoolid.
to import from that CSV I'd import it into a temp table and then run through that with a counter to add records to the other tables.
maybe look at SQLite...
SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file.
at a guess you want to create a stored procedure...
LOL, apologies for that, had been in the pub for lunch before I wrote it... on the right lines though I think, I suspect you could achieve what you want with a self join..
is there a value which will be common between them and unique for each final record, rather than them just being 2 different weeks of data? i.e. could you only have one memberno per week or one of each unit per week?
INSERT INTO #temp1 (MemberNo, MemberItemCode, NCDescription, Week1Usage, Week1Price, week2Usage, week2Price)
select InvD1.MEMBERNO, InvD1.ITEMCODE, InvD1.DESCRIPTION, InvD1.QTYSHIPPED, InvD1.PRICE, InvD2.qtyshipped, InvD2.price
FROM INVOICEDETAIL as InvD1
join INVOICEDETAIL as InvD2 on InvD1.unit = InvD2.unit
AND (INVOICEDATE BETWEEN @BegDate AND @Week1End)
the result of a select statement isn't NULL its just an empty result set, if thats supposed to be part of a SELECT statement, have a look at using CASE.
select blah1, blah2, CASE (Select count(ItemCode)
where Unit='BIG RED ONE'
and MemberItemCode= '314IMPie'
and ItemCode in (Select ItemCode from UnitProducts where Unit='BIG RED ONE'))
WHEN 0 THEN 'X'
doh... didn't read question properly
could use mySQL, or PostgreSQL... mySQL works well in windows if you can't host the DB on an alternate OS...
oops... mySQL, assuming your on a 'nix machine you do it with a cron job
yup, and if your using express edition then you can do it with scheduled tasks, batch files and the sqlcmd command, prob. run it at 00:01 everyday....
just use rsync...
hope you don't reuse that uname/password elsewhere....
not the cause of a BCP error I don't think, but you can't create a .xls file from bcp, you can create a .csv which excel will open though.
gonna guess your gonna be wanting to google cron... thats a vague guess though...
Last Updated 1 Jan 1900
All Rights Reserved.