Question : Parse Flat file...

Here's something I never tried before...

I have a file en_us.js that has two (LONG) lines of text.

Line one starts:
SUGAR.language.setLanguage('app_strings', {"LBL_SORT":"Sort","LBL_OUTBOUND_EMAIL_ADD_SERVER"....etc...

Line two starts:
SUGAR.language.setLanguage('app_list_strings', {"language_pack_name":"US English", etc...

I need the ability "read" the file like a table...
the "group" will be the text after the first ( and before the first comma
the columns are "" qualified and seperated by : after the firt {
The next "set" is seperated by the commas

So I need...
Select * from myNewtable
where group='app_list_strings' and grpType in ('language_pack_name,'etc''')

or
Select grpDescription from myNewTable where grpType = 'language_pack_name'

I need to read the file I guess as a linked server?

But I need to do the parse in SQL Server so I can do some joins in my stored procedures.
Or figure out a way to do an import each morning into a table


Group                    grpType                               grpDescription
app_strings           LBL_SORT                             Sort
app_strings           etc....                                      etc....
app_list_strings     language_pack_name           US English
app_list_strings      etc....                                      etc....

Answer : Parse Flat file...

I believe that you need to add a Q_OBJECT to classes which inherit from QObject:

class CustomOgreWidget :
  public OgreWidget
{
  Q_OBJECT

public:
  CustomOgreWidget(QWidget* parent=0, Qt::WindowFlags f=0);
  ~CustomOgreWidget(void);

public slots:
  void SlotOpenProject(void);
};
Random Solutions  
 
programming4us programming4us