|
|
Browse by Tags
All Tags » sql query
Showing page 1 of 2 (12 total posts)
-
I am pretty new to this Reg Exp stuff, but gaining more understanding every day. My ASP application is attempting to Split a WHERE clause on the " AND "s, but having no luck. I would also one day like to expand it to be able to split on " OR " but for now I settle with the baby step.
Expression: ...
-
Hi,
Programming language: Delphi with pcre-compatible component
The question is: Split the SQL-statement items to:
-type (select|insert|delete|truncate table)
-distinct mode if exist (is disitinct|is not distinct)
-top if exist (top statement - rows or persent)
-join if exist (type of join, cross-table and cross-condition)
Thats what I ...
-
Hello all, new to this community. Having some difficulties getting a regex to parse a standard SQL query. It make it simple I will just answer the bullet points from the 'READ FIRST' post.
1. Programming language used - Javascript (or if PHP is easier is accomplish this task, that can be done too)
2. My ultimate task is to create ...
-
hi,
i want to parse a file that contains SQL queries which can be executed within SQL Server Query Analyzer. The format of the file is
SQL Statement 1
GO
SQL Statement 2
GO
SQL Statement 3
GO
etc
What i want to do is extract each SQL statement, eg (SQL Statement 1, SQL Statement 2 etc). Each statement maybe multiple ...
-
Hello
I have to parse a SQL INSERT statement to get all the values to include in the database.
I thought that a regex should exist to do this, and I found this very nice regex (http://regexlib.com/REDetails.aspx?regexp_id=1750) :
(INSERT ...
-
Hi,
I need to create a system that if a user signs up it will check if this user is already signed up.
it will check sometimes by phone number
somtimes on address and firstname
sometimes on addres and lastname
sometime on lastname and city and address.
sometimes for the customer ID.
so how would I use regex to check if there is a similar ...
-
Hello,
I've been trying to write a regex that would split any sql select query and capture different clauses to the groups. That is, there should be 5 groups (eg. top, select, from, where, order) each containing corresponding text (the group is empty if the clause is missing).
For example, lets try and split this query:
SELECT ...
-
thanks guys,
very useful forum !
let me try the expression & i will till you the findings
Thanks alot
-
Here you go:
(?i)^\[[^\]]+\]\.\[[^\]]+\]\s+(?:LIKE|=|<|>|<>|<=|>=)\s+(?:'[^']*'|\d+)(?:\s+AND\s+\[[^\]]+\]\.\[[^\]]+\]\s+(?:LIKE|=|<|>|<>|<=|>=)\s+(?:'[^']*'|\d+))?\s*$
-
I'd rather have a regex to split SQL statements with, but this generates problems with not splitting quoted strings as well. You would need a variable length lookbehind assertion. I'll try to match non whitespace characters instead.
If you also need to have operators like "<=" and ">=" and numbers in any ...
1
|
|
|