• Welcome to SQLitening Support Forum.
 

News:

Welcome to the SQLitening support forums!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Marc Giao

#1
General Board / Re: PowerBASIC has been sold!
February 01, 2017, 06:31:27 PM
At least Drake Software has the size and, I hope, the resources, now we'll just have to wait and see if they have the know how! They obviously have the business savvy so half of the equation is there.

Marc
#3
Hi Marty,

I only had to do it on one intallation. I did not reboot, I just stoped SQLitening server and replaced all the files on the server and local machines, updated the config file, restarted the SQLitening server and all was well, BUT, I did have an issue with the new SQLite dll so please be sure to read the following link:

http://www.sqlitening.com/support/index.php?topic=3410.0

Good luck and I hope it helps,

Marc
#4
Easy :)

The second download under "Precompiled Binaries For Windows" in the following link:

http://www.sqlite.org/download.html

Marc
#5
And using:

slEXE( "PRAGMA automatic_index = false", "E" )

Resolves the issue with version 3.7.7.1! However, 3.7.8 still seems to be faster to me, athough 3.7.8's faster speed versus 3.7.7.1 is strictly based on observation and not on hard testing.

Best Regards,

Marc
#6
Hi Sean,

Thanks for the pointer, I am happy to report 3.7.8 does indeed fix the problem! I haven't tried using "PRAGMA automatic_index = false" with earlier versions to see if it also resolves the problem.

I can't say I understand what's happening/going on but 3.7.8 does resolves the speed issue.

Thanks for the help Sean and Fred for a great product... isn't this forum great?!?!

Best Regards,

Marc
#7
Hi All,

First and foremost, Fred, thank you for the latest release and all your effort.

Now for my puzzle, I
#8
Hi Gary,

It's an alias, from:
http://www.w3schools.com/sql/sql_alias.asp

QuoteSQL Alias

You can give a table or a column another name by using an alias. This can be a good thing to do if you have very long or complex table names or column names.

An alias name could be anything, but usually it is short.


Marc

#9
Hi Sean,

Well, I
#10
Hi Sean,

I should have explained better.

The image on the right is the table as it exists in the live database showing the calls sorted in descending order. The yellow rows are the calls numbers the query should return, in this case 1106 and 1105. The red rows are the calls number that should not be returned, in this case 1104 to 1100.

The image on the left is what your query (shown below the image) returns. The yellow rows are the call numbers that should have been and were, correctly returned. The red ones are call numbers that should not have been returned but were.

As can be seen, a call number (call_id)  may have any number of links (call_link), the query should be checking the last or highest link for each call number, for the condition "call_link='NEW and call_status<>'SUPPORT'". So, if the call has 1 link, we test link 0, if 2 links we test link 1, if 3 links we test link 2, if 4 links we test link 3, if 5 links we test link 4 etc.

I can't test you latest statement from this pc but will let you know the results as soon as I get to the other laptop.

Thanks for trying,

Marc
#11
Hi Sean,

No "bragging rights" yet :)

An image is better than any description of mine, taken from real data on the live database. Aside from changing the column names to work with the live database, the only other thing I added was "DESC" to your "ORDER BY" statement. Yellows are correct, reds show where the query failed (they should not show):

All the best,

Marc
#12
Hi Fred,

Yep, that's pretty much I resolved it too but I was hoping for a more elegant solution. If I find a purely SQL solution I'll report back.

Thanks,

Marc
#13
Hi Fred,

It returns all of then because, in this case, all "link 0" records are "new" and don't equal "supp". I need the same thing but for the last link, the link with the largest values for each call.

The following almost gets what I need but, not surprising, misses call number 1475

Select call from tbl_calls
  where call in
    (Select call from tbl_calls where link=0 and status='new')
  and link<>0 and status='new' and user<>'supp'


Thanks,

Marc
#14
Hi Guys,

I need help one again, my knowledge of SQL is still very limited and I've been fighting this one for a wile  :-[

Assume the following table, tbl_calls:

   call         link       status       user
1752          0          new          mike
1752          1         active        supp
1752          2         active        mike
1752          3          new         supp


1475          0          new          mike


1558          0          new          jeff
1558          1         active        supp
1558          2          new         mike

1299          0          new          tony
1299          1         active        mike
1299          2          new         jeff


-call/link combination is always unique
-status for the first link (0) is always the same as the status for the last (highest) link
-user could be any name

What I need is query that will return the "call" number of every call whose last "link" is "new" but does not equal "supp".

For the above table example the numbers 1558, 1475 and 1299 should be returned.

My efforts always seem to trip over call 1475, the only solution that works for me is to first do a query where link=0 and status=new and user<>supp then in my code finding the last "link" and checking if  status=new and user<>supp. However, I'd like to do it using an SQL query, I think it's possible but so far, no luck.

Thanks for any and all help :)

Marc
#15
Hi Gary,

Yes, that will do it too but I prefer not to reference rows so here is one more way if you just want one or more fields:

QuoteslSel "SELECT TransID FROM PorgramData"

Don't you just love how simple it is :)

Marc